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.
import ( | |
"crypto/rand" | |
"encoding/binary" | |
) | |
func randUInt32() (uint32, error) { | |
bytes := make([]byte, 4) | |
_, err := rand.Read(bytes) | |
return binary.BigEndian.Uint32(bytes), err | |
} |
function pluralize(count, name) { | |
var suffix = (count == 1) ? "" : "s" | |
return count + name + suffix | |
}; | |
function secondsToDescriptiveTime(seconds) { | |
var DAYCOUNT = 86400 | |
var HOURCOUNT = 3600 | |
var MINUTECOUNT = 60 |
#!/bin/bash - | |
#=============================================================================== | |
# FILE: Mind Trainder | |
# USAGE: ./mind_trainer.sh | |
# | |
# DESCRIPTION: Train your mind to quickly find your income as a freelancer. | |
# AUTHOR: Dr. Sandeep Sadanandan (sillyfellow), [email protected] | |
#=============================================================================== | |
set -o nounset # Treat unset variables as an error |
package main | |
import ( | |
"encoding/base64" | |
"net/http" | |
"strings" | |
) | |
type handler func(w http.ResponseWriter, r *http.Request) |
#!/usr/bin/python3 | |
import csv | |
import json | |
import urllib.request | |
import urllib.parse | |
from time import sleep | |
def parse_json_response(response): | |
content = response.readall().decode('utf-8') |
#!/usr/bin/env ruby | |
class CountAndroidMethods | |
def count(path) | |
full_folder_path = File.expand_path(path) | |
total_count = 0 | |
# Traverse the folder | |
Dir.entries(full_folder_path).each {|file| |
#!/usr/bin/python | |
import numpy as np | |
from random import randint | |
def gen_points(a, b, num_divisions): | |
if num_divisions == 0: | |
return [a] | |
xdiff = b[0] - a[0] | |
ydiff = b[1] - a[1] |
def cons(list, count): | |
if count <= 0: | |
count = 1 | |
for i in range(len(list) - count + 1): | |
yield list[i: i+count] |
# | |
# python drive.py "origin" ["waypoint" ... ] "destination" | |
# | |
# i.e. python drive.py "Union Square, San Francisco" "Ferry Building, San Francisco" 'Bay Bridge' SFO | |
import sys, json, urllib2, md5, os.path, pprint | |
from math import radians, sin, cos, atan2, pow, sqrt | |
from urllib import quote_plus | |
from xml.sax.saxutils import escape | |
from optparse import OptionParser |