Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
+ -== ==| | |
( <*> <*> ||// | |
| | yo _||/__ | |
| __| \| ||| | |
| +++ \ / | |
I turned this gist into a "real" repository. It is here: http://github.com/pete/cats . | |
Here, placed side-by-side for comparison, are GNU's implementation of | |
cat, Plan 9's implementation, Busybox's implementation, and NetBSD's | |
implementation, Seventh Edition Unix (1979), and 4.3BSD. | |
For good measure (and because I suppose I am now committed to collecting | |
cats) also included are Second Edition Unix (in assembly) and Inferno's | |
implementation (in Limbo) for good measure. |
#! /usr/bin/env python2 | |
# Requires: PIL, colormath | |
# | |
# Improved algorithm now automatically crops the image and uses much | |
# better color matching | |
from PIL import Image, ImageChops | |
from colormath.color_conversions import convert_color | |
from colormath.color_objects import LabColor | |
from colormath.color_objects import sRGBColor as RGBColor |
// Alternative JavaScript Syntax | |
Person = :(name, address) { @name!, @address! } | |
Person::inspect = :{ <: "{@name} lives at {@address}" } | |
tj := Person('TJ', '314 Bessborough ave') | |
bob := Person('Bob', 'Some place') | |
[tj, bob].each(:(person){ print(person.inspect()) }) |
Hi there!
The docker cheat sheet has moved to a Github project under https://github.com/wsargent/docker-cheat-sheet.
Please click on the link above to go to the cheat sheet.
;;; gno-mode.el --- Major mode for editing GNO files, based on go-mode -*- lexical-binding: t -*- | |
;; Author: Guilhem Fanton <guilhem.fanton@gmail.com> | |
;; Version: 0.1 | |
;; Package-Requires: ((emacs "24.3") (go-mode "1.5.0")) | |
;; Keywords: languages, gno | |
;; URL: https://gist.github.com/gfanton/6e233656dfeabd7a46f21f7507b6b311 | |
;;; Commentary: | |
;; |
const four = () => process.toString().big().endsWith(String.fromCharCode(18 + ((process.toString().substring(1, 2).charCodeAt(Number.MIN_VALUE)) * 4) - Math.pow(20, 2))).toString().length; | |
console.log(four()); // 4 | |
const assert = require("assert"); | |
const fourButReadable = () => { | |
// String that contains an o as the second character | |
const objectInString = process.toString(); | |
assert.strictEqual(objectInString, "[object process]"); |
#!/bin/bash | |
# | |
# Based upon [[https://superuser.com/questions/1268732/how-to-hide-tab-bar-tabstrip-in-firefox-57-quantum/1268734#1268734][How to hide tab bar (tabstrip) in Firefox 57+ Quantum]] by [[https://superuser.com/users/162466/vasyanovikov][VasyaNovikov]] | |
# This causes the [[https://support.mozilla.org/en-US/questions/1187186][The Back Button is top right under the Red close button on my Mac]] issue. | |
# Resolve that by right-clicking the toolbar, then inserting three Flexible Space into the toolbar on the far-left-hand side. | |
case $( uname ) in | |
"Linux") | |
profile_dir=~/.mozilla/firefox/$( ls -tr ~/.mozilla/firefox/ | grep -v profiles.ini | tail -1 ) | |
;; | |
"Darwin") |
var spawn = require('child_process').spawn | |
var instance = { | |
ipAddress: "0.0.0.0" | |
}; | |
var awsPreSharedKeyPath = '~/.ssh/aws-preshared-key.pem'; // make sure key has permissions 600 with chmod | |
var spawnArgs = [ '-tt', // force teletype since ssh uses a psuedo-terminal |