This allows you to receive desktop notifications from grunt running inside of a local vagrant box.
Install grunt-notify and add to dev dependencies
This is done on the guest VM (within the vagrant box).
| applicators = {3 => "fizz", 5 => "buzz"} | |
| fizzbuzz = | |
| (1..100).map do |n| | |
| fb = applicators. | |
| select{|a| n % a == 0}. | |
| values.join | |
| [n.to_s, fb].max # "1" > "" and "fizz" > "100000" since "1" < "a" | |
| end | |
| puts fizzbuzz |
| #!/bin/bash | |
| # Depends on git, curl, jq | |
| BAK_DIR=$(date +"%y%m%d-%H%M") | |
| GISTS_URL="https://api.github.com/users/$USER/gists?per_page=1000&access_token=$GITHUB_ACCESS_TOKEN" | |
| mkdir "$BAK_DIR" && cd "$BAK_DIR" && curl -s "$GISTS_URL" | jq ".[] | .git_pull_url" | xargs -n1 git clone |
This allows you to receive desktop notifications from grunt running inside of a local vagrant box.
grunt-notify and add to dev dependenciesThis is done on the guest VM (within the vagrant box).
| class Array | |
| # Returns a proc which calls [] with the array's contents as arguments | |
| # | |
| # ====Usage | |
| # [[1, 2], [3, 4], [5, 6]].map(&[0]) | |
| # # => [1, 3, 5] | |
| # | |
| # [{ hello: 'world' }, { hello: 'sun', goodbye: 'moon' }].map(&[:hello]) | |
| # # => ['world', 'sun'] |
I really wanted a way to re-sync a fork with upstream, so this is it. Just put it in your path, and make sure that you have a remote called upstream that points to the original project.
WARNING: For forks only. If you use it on a non-fork project, bad things will happen. This will re-write history, so be careful.
| #!/bin/bash | |
| # | |
| # When you are working on your macbook sitting in cafe and you have to go pee, | |
| # you need some way to guard you machine. | |
| # | |
| # Start this script, remove any earphones, and go do the job. | |
| # The assumption is the thief will close the lid of the laptop before taking it away. | |
| # This script detects the closing of the lid and plays some loud audio that will | |
| # likely distract the thief and/or grab attention of nearby people, making the |
| " | |
| " usage: :Vimgrep /foo/ ** | |
| " | |
| function! s:exit_handler(id) dict abort | |
| execute 'cfile' self.tempfile | |
| copen | |
| endfunction | |
| function! s:vimgrep(args) abort |
The following allows macOS users to run two different Vivaldi's alongside each other (e.g. stable and snapshot), with their prefences/settings stored seperately. This is also handy if you want to do an initial test of a snapshot in a self contained manor, without touching your main prefences/settings.
It works by causing launch Vivaldi in such a way that it stores its prefences/settings in a directory next it (called "Vivaldi Data"), rather than using the default prefences/settings directory ("~/Library/Application Support/Vivaldi").
Automator.app (part of macOS) and create a new "Service"| var str = 'class ಠ_ಠ extends Array {constructor(j = "a", ...c) {const q = (({u: e}) => {return { [`s${c}`]: Symbol(j) };})({});super(j, q, ...c);}}' + | |
| 'new Promise((f) => {const a = function* (){return "\u{20BB7}".match(/./u)[0].length === 2 || true;};for (let vre of a()) {' + | |
| 'const [uw, as, he, re] = [new Set(), new WeakSet(), new Map(), new WeakMap()];break;}f(new Proxy({}, {get: (han, h) => h in han ? han[h] ' + | |
| ': "42".repeat(0o10)}));}).then(bi => new ಠ_ಠ(bi.rd));'; | |
| try { | |
| eval(str); | |
| } catch(e) { | |
| alert('Your browser does not support ES6!') | |
| } |