View machine.js
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions | |
// - XState (all XState exports) |
View machine.js
// Available variables: | |
// - Machine | |
// - interpret | |
// - assign | |
// - send | |
// - sendParent | |
// - spawn | |
// - raise | |
// - actions |
View install vscode extensions
# generate by running command | |
# code --list-extensions | xargs -L 1 echo code --install-extension | |
code --install-extension Zignd.html-css-class-completion | |
code --install-extension abusaidm.html-snippets | |
code --install-extension angryobject.react-pure-to-class-vscode | |
code --install-extension azemoh.one-monokai | |
code --install-extension bibhasdn.unique-lines | |
code --install-extension dbaeumer.vscode-eslint | |
code --install-extension drKnoxy.eslint-disable-snippets |
View Basic Node Docker file
FROM ubuntu:14.04 | |
RUN apt-get -y update | |
RUN apt-get -y install software-properties-common | |
RUN add-apt-repository ppa:chris-lea/node.js | |
RUN apt-get -y update | |
RUN apt-get -y install nodejs | |
ADD . /src | |
RUN cd /src; npm install | |
EXPOSE 8080 | |
CMD ["nodejs", "/src/index.js"] |
View gist:71c5cdbe696665ce5b4a
// when using Browserify with Angular + ngmin you may do something like this | |
// controllers/example-list.js | |
module.exports = function ($scope) { | |
//.. | |
}; | |
// example-module.js | |
var exampleListController = require('./controllers/example-list'); |
View gist:44a0577278737143e2f8
$type: "scale"; | |
$value: 50%; | |
$lb: "("; | |
$rb: ")"; | |
div { | |
transform:( #{$type}#{$lb}#{$value}#{$rb} ); | |
} |
View OS X - installing Ansible via `pip install`
// brew install ansible didn't work properly, | |
// even tried brew install python but no joy | |
// so use pip on standard python install | |
sudo pip install ansible | |
// if you get errors try this | |
// from https://github.com/ansible/ansible/issues/7146 | |
When you get to the step 'sudo pip install ansible', do this instead: |
View gist:9972975
var Q = require('q'); | |
var HTTP = require("q-io/http"); | |
Q.all( [ | |
HTTP.request('https://mathstracker.co.uk/').timeout(5000).then(getStatus), | |
HTTP.request('http://mammal.io/').timeout(5000).then(getStatus) | |
]) | |
.then(function(resStatusArray) { | |
console.log(resStatusArray); | |
}) |
View gist:6462367
fix is here https://github.com/SublimeLinter/SublimeLinter/commit/4ed28de | |
-- | |
in Sublime Text 3, in the SublimeLinter folder | |
edit SublimeLinter.py | |
42: +MARK_THEMES_PATH = os.path.join('Packages', 'SublimeLinter', 'gutter_mark_themes') | |
263: gutter_mark_image = gutter_mark_theme + '-' + lint_type |
NewerOlder