start new:
tmux
start new with session name:
tmux new -s myname
| <?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'; | |
| }; |
| <?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); |
| //$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> | |
| <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; |
| <?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; |
| <?php | |
| // $details = "http://maps.googleapis.com/maps/api/distancematrix/json?origins=Seattle&destinations=San+Francisco&mode=driving&sensor=false"; | |
| //you can also pass latitude/longitude values in origins | |
| // $details = "http://maps.googleapis.com/maps/api/distancematrix/json?origins=41.43206,-81.38992&destinations=San+Francisco&mode=driving&sensor=false"; | |
| // $details = "http://maps.googleapis.com/maps/api/distancematrix/json?origins=indore+mp&destinations=dewas+mp&mode=driving&sensor=false"; | |
| $details = "http://maps.googleapis.com/maps/api/distancematrix/json?origins=22.720816,75.874925&destinations=22.721786,75.878326&mode=driving&sensor=false"; | |
| <?php | |
| function replace_in_file($FilePath, $OldText, $NewText) | |
| { | |
| $Result = array('status' => 'error', 'message' => ''); | |
| if(file_exists($FilePath)===TRUE) | |
| { | |
| if(is_writeable($FilePath)) | |
| { | |
| try | |
| { |
| #include <stdio.h> | |
| int main() | |
| { | |
| int a = 10, b = 0, c = 10; | |
| char* str = "TFy!QJu ROo TNn(ROo)SLq SLq ULo+UHs UJq " | |
| "TNn*RPn/QPbEWS_JSWQAIJO^NBELPeHBFHT}TnALVlBL" | |
| "OFAkHFOuFETpHCStHAUFAgcEAelclcn^r^r\\tZvYxXyT|S~Pn SPm " | |
| "SOn TNn ULo0ULo#ULo-WHq!WFs XDt!"; | |
| while (a != 0) | |
| { |