start new:
tmux
start new with session name:
tmux new -s myname
| <?php | |
| /** | |
| * @author @GabrielJMJ /twitter | |
| * @description Abstract class to define a interface of a converter | |
| * @link https://gist.github.com/GabrielJMJ/6977968 Gist on GitHub | |
| **/ | |
| abstract class Converter{ | |
| protected $valueWithCurrency; | |
| protected $toCurrency; |
| <!DOCTYPE html> | |
| <html> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0"/> | |
| <title>Web Notifications API Demo</title> | |
| <style> | |
| * | |
| { | |
| -webkit-box-sizing: border-box; |
| //$window.location.reload(); | |
| //$state.go("login"); | |
| $cookies.put("token", response.token); | |
| var value = $cookies.get("token"); | |
| /* $cookies.put("loginUserId", response[0].id); | |
| $rootScope.loginUserId = $cookies.get("loginUserId"); */ | |
| localStorageService.set("loginUserId", response.id); |
| <?php | |
| ### function for curl ### | |
| /* gets the data from a URL */ | |
| function get_data($url) { | |
| $ch = curl_init(); | |
| $timeout = 5; | |
| curl_setopt($ch, CURLOPT_URL, $url); | |
| curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); | |
| curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout); |
| <?php | |
| /*$date = new DateTime('2017-12-21T01:30:00.0000000', new DateTimeZone('Asia/Kolkata')); | |
| echo "Indian time:". $date->format("Y-m-d H:i:s P");echo "<br>"; | |
| $date->setTimeZone(new DateTimeZone('America/New_York')); | |
| echo date('Y-m-d H:i:s', strtotime('2017-12-21T01:30:00.0000000') + (5.5 * 3600));*/ | |
| /*$a = function() { | |
| echo 'hello world'; | |
| }; |
| # for setting node path in windows | |
| setx NODE_PATH "%NODE_PATH%;C:\Users\winbdows 7\AppData\Roaming\npm\node_modules" |
| There are plenty of one line terminal commands that can prove to be exorbitantly dangerous. | |
| 1. The Delete Everything Command | |
| rm -rf / | |
| This command deletes everything it possibly can, including files on your hard drive and files on connected removable media devices. This command can be explained as follows: | |
| rm – Remove the following files. | |
| -rf – Run rm recursively. |
| //$window.location.reload(); | |
| //$state.go("login"); | |
| $cookies.put("token", response.token); | |
| var value = $cookies.get("token"); | |
| /* $cookies.put("loginUserId", response[0].id); | |
| $rootScope.loginUserId = $cookies.get("loginUserId"); */ | |
| localStorageService.set("loginUserId", response.id); |
| <!DOCTYPE html> | |
| <html> | |
| <body> | |
| <center> | |
| <form action="ab1.php" method="post" enctype="multipart/form-data"> | |
| Select image to upload: | |
| <input type="file" name="file"><br><br> | |
| Desired width: <input type="text" name="desired_width"><br><br> | |
| <input type="submit" value="Upload Image" name="submit"> | |
| </form> |