Homebrew Formula patching old ImageMagick release 6.8.9-10
brew install https://gist.github.com/sillyfellow/5ab9ff42705c27868946ca75fb443d0a/raw/6bb85dc345711f6cff0b52231ef4bd5f2bd210e6/imagemagick.rb
To prevent upgrades you can pin this version.
#!/bin/bash | |
# Generate an alphanumeric 16 character password | |
randpw() { | |
< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-16} | |
echo | |
} | |
# Generate a 16 character password where the adjacent characters are typed with different hands (left/right) | |
randpwmix() { |
I hereby claim:
To claim this, I am signing this object:
#!/usr/bin/python | |
from django.conf.urls import RegexURLPattern, RegexURLResolver | |
from django.core import urlresolvers | |
urls = urlresolvers.get_resolver() | |
def if_none(value): | |
if value: | |
return value |
package main | |
import ( | |
"flag" | |
"net/http" | |
"time" | |
log "github.com/sirupsen/logrus" | |
) |
/* | |
* Binary Tree | |
* Binary Search Tree | |
* AVL Tree | |
* | |
* All in pure Javascript, ES6 classes and with inheritance. | |
*/ | |
#!/bin/bash | |
# list and export all collections to json using mongoexport, from a specific mongo db | |
[ $# -ne 1 ] && echo "Usage: $0 <db-name>" && exit 1 | |
DB=${1} | |
# fetch the list of all collections | |
COLLECTIONS=$(mongo localhost:27017/$DB --quiet --eval "db.getCollectionNames()" | grep \" | tr -d '\[\]\"[:space:]' | tr ',' ' ') |
func RankReposition(newPosition int, siblings List) { | |
// No siblings, we take the middle spot | |
if len(siblings) == 0 { | |
return midWay // 2^63? | |
} | |
// Want to be the first one? Take the lowest rank and stand before it | |
if newPosition == 0 { | |
result = siblings.first.rank - windowSize | |
if result < 0 { |
func intersection(s1, s2 string) string { | |
m := map[rune]bool{} | |
for _, c := range s1 { | |
m[c] = true | |
} | |
var ret string | |
for _, c := range s2 { | |
if _, y := m[c]; y { |
~/D/ndk ❯❯❯ ls | |
android-ndk-r18b android-ndk-r18b-linux-x86_64.zip | |
~/D/ndk ❯❯❯ ls android-ndk-r18b/ | |
build meta ndk-depends ndk-stack NOTICE platforms python-packages shader-tools source.properties sysroot wrap.sh | |
CHANGELOG.md ndk-build ndk-gdb ndk-which NOTICE.toolchain prebuilt README.md simpleperf sources toolchains | |
~/g/s/g/sillyfellow ❯❯❯ mkdir wget-go | |
~/g/s/g/sillyfellow ❯❯❯ cd wget-go | |
~/g/s/g/s/wget-go ❯❯❯ ls | |
~/g/s/g/s/wget-go ❯❯❯ vim main.go | |
~/g/s/g/s/wget-go ❯❯❯ go run main.go |