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
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.
| /* | |
| Copy this into the console of any web page that is interactive and doesn't | |
| do hard reloads. You will hear your DOM changes as different pitches of | |
| audio. | |
| I have found this interesting for debugging, but also fun to hear web pages | |
| render like UIs do in movies. | |
| */ | |
| const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
I've been deceiving you all. I had you believe that Svelte was a UI framework — unlike React and Vue etc, because it shifts work out of the client and into the compiler, but a framework nonetheless.
But that's not exactly accurate. In my defense, I didn't realise it myself until very recently. But with Svelte 3 around the corner, it's time to come clean about what Svelte really is.
Svelte is a language.
Specifically, Svelte is an attempt to answer a question that many people have asked, and a few have answered: what would it look like if we had a language for describing reactive user interfaces?
A few projects that have answered this question:
| // 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'; |
| 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 |
@module-federation/nextjs-mf.yarn add @module-federation/nextjs-mfpackage.json: "resolutions": {| 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! |
| import { takeEvery } from 'redux-saga'; | |
| import { call, put } from 'redux-saga/effects'; | |
| // Watcher | |
| function* watchFetchData() { | |
| yield* takeEvery('FETCH_REQUESTED', fetchData); | |
| } | |
| // Worker | |
| function* fetchData(action) { |
| <?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', |