Skip to content

Instantly share code, notes, and snippets.

/*!
Math.uuid.js (v1.4)
http://www.broofa.com
mailto:robert@broofa.com
Copyright (c) 2010 Robert Kieffer
Dual licensed under the MIT and GPL licenses.
*/
/*
master:
image: rancher/server
container_name: master
volumes_from:
- mysql
ports:
- "8080:8080"
links:
- mysql
environment:
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!')
}
@sax1johno
sax1johno / Contract Killer 3.md
Created November 1, 2016 20:55 — forked from malarkey/Contract Killer 3.md
The latest version of my ‘killer contract’ for web designers and developers

Contract Killer

The popular open-source contract for web professionals by Stuff & Nonsense

  • Originally published: 23rd December 2008
  • Revised date: March 15th 2016
  • Original post

@sax1johno
sax1johno / remove-docker-containers.md
Created August 2, 2016 02:10 — forked from ngpestelos/remove-docker-containers.md
How to remove unused Docker containers and images
  1. Delete all containers

     $ docker ps -q -a | xargs docker rm
    

-q prints only the container IDs -a prints all containers

Notice that it uses xargs to issue a remove container command for each container ID

  1. Delete all untagged images
// Chrome extension button / popup / requester
chrome.tabs.getSelected(null, function(tab) {
chrome.tabs.sendRequest(
tab.id, // id of the tab to send a request to.
{method: "getHighlighted", name: "John"}, // data to send to the tab
function(response) { // function to execute when the tab responds.
if (response.method == 'getHighlighted') {
chrome.setClipboard(response.data); // Something like this.
// response.data contains our highlighted text.
}