Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
Most of programs will not accept an email using just @localhost as domain.
So, edit /etc/hosts file to make the domain localhost.com point to your machine, including this content to the file:
127.0.0.1 localhost.com
| <?php | |
| function convertCurrency($amount, $from, $to){ | |
| $data = file_get_contents("https://www.google.com/finance/converter?a=$amount&from=$from&to=$to"); | |
| preg_match("/<span class=bld>(.*)<\/span>/",$data, $converted); | |
| $converted = preg_replace("/[^0-9.]/", "", $converted[1]); | |
| return number_format(round($converted, 3),2); | |
| } | |
| echo convertCurrency("10.00", "GBP", "USD"); |
| <?php | |
| $countryArray = array( | |
| 'AD'=>array('name'=>'ANDORRA','code'=>'376'), | |
| 'AE'=>array('name'=>'UNITED ARAB EMIRATES','code'=>'971'), | |
| 'AF'=>array('name'=>'AFGHANISTAN','code'=>'93'), | |
| 'AG'=>array('name'=>'ANTIGUA AND BARBUDA','code'=>'1268'), | |
| 'AI'=>array('name'=>'ANGUILLA','code'=>'1264'), | |
| 'AL'=>array('name'=>'ALBANIA','code'=>'355'), | |
| 'AM'=>array('name'=>'ARMENIA','code'=>'374'), | |
| 'AN'=>array('name'=>'NETHERLANDS ANTILLES','code'=>'599'), |
| <?php | |
| error_reporting(E_ALL); | |
| require __DIR__ . '/FastRoute/src/bootstrap.php'; | |
| spl_autoload_register(function ($class) { | |
| require __DIR__ . '/Pux/src/' . strtr($class, '\\', '/') . '.php'; | |
| }); |
Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.
####Search, Go to, Navigation ####
Cmd + P - Search file
Cmd + Shift + O - Search everywhere
(I swapped the above two recently because I use Cmd + P to search for files most of the time).
These are my notes basically. At first i created this gist just as a reminder for myself. But feel free to use this for your project as a starting point. If you have questions you can find me on twitter @thomasf https://twitter.com/thomasf This is how i used it on a Debian Wheezy testing (https://www.debian.org/releases/testing/)
Discuss, ask questions, etc. here https://news.ycombinator.com/item?id=7445545
| <?php | |
| class SecureSessionHandler extends SessionHandler { | |
| protected $key, $name, $cookie; | |
| public function __construct($key, $name = 'MY_SESSION', $cookie = []) | |
| { | |
| $this->key = $key; | |
| $this->name = $name; |
| <!-- HTML heavily inspired by http://blueimp.github.io/jQuery-File-Upload/ --> | |
| <div class="table table-striped" class="files" id="previews"> | |
| <div id="template" class="file-row"> | |
| <!-- This is used as the file preview template --> | |
| <div> | |
| <span class="preview"><img data-dz-thumbnail /></span> | |
| </div> | |
| <div> | |
| <p class="name" data-dz-name></p> |
| // Get the template HTML and remove it from the doument. | |
| var previewNode = document.querySelector("#template"); | |
| previewNode.id = ""; | |
| var previewTemplate = previewNode.parentNode.innerHTML; | |
| previewNode.parentNode.removeChild(previewNode); | |
| var myDropzone = new Dropzone(document.body, { // Make the whole body a dropzone | |
| url: "/target-url", // Set the url | |
| thumbnailWidth: 80, | |
| thumbnailHeight: 80, |
Here is a high level overview for what you need to do to get most of an Android environment setup and maintained.
Prerequisites (for Homebrew at a minimum, lots of other tools need these too):
xcode-select --install will prompt up a dialog)Install Homebrew:
ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"