Skip to content

Instantly share code, notes, and snippets.

View miketaylr's full-sized avatar
🌭

Mike Taylor miketaylr

🌭
View GitHub Profile
@vladikoff
vladikoff / bugzilla.css
Last active August 29, 2015 13:57
GitHub-like CSS override skin for Bugzilla
* {
font-family: Consolas, monospace!important;
}
body {
background: white;
font-size: 11px;
}
.bz_group_visibility_section {
#!/bin/sh
DATE=`date +%Y%m%d`
ALEXA_URL=http://www.alexa.com/topsites/countries%3B
COUNTRY_CODE=$1
OUTPUT_FILE=ALEXA_${COUNTRY_CODE}-${DATE}.txt
echo "Downloading Alexa top site data for $COUNTRY_CODE"
#!/bin/sh
if [ $1 == "android" ]; then
UA='Mozilla/5.0 (Android; Mobile; rv:18.0) Gecko/18.0 Firefox/18.0'
shift # removes the first argument if it's "android"
else
UA='Mozilla/5.0 (Mobile; rv:18.0) Gecko/18.0 Firefox/18.0'
fi
while [ "$#" -gt "0" ]
do
@dan-blanchard
dan-blanchard / .1.miniconda.md
Last active December 11, 2019 22:38
Quicker Travis builds that rely on numpy and scipy using Miniconda

For ETS's SKLL project, we found out the hard way that Travis-CI's support for numpy and scipy is pretty abysmal. There are pre-installed versions of numpy for some versions of Python, but those are seriously out of date, and scipy is not there are at all. The two most popular approaches for working around this are to (1) build everything from scratch, or (2) use apt-get to install more recent (but still out of date) versions of numpy and scipy. Both of these approaches lead to longer build times, and with the second approach, you still don't have the most recent versions of anything. To circumvent these issues, we've switched to using Miniconda (Anaconda's lightweight cousin) to install everything.

A template for installing a simple Python package that relies on numpy and scipy using Miniconda is provided below. Since it's a common s

# MAC manipulators
alias random_mac='sudo ifconfig en0 ether `openssl rand -hex 6 | sed "s/\(..\)/\1:/g; s/.$//"`'
alias restore_mac='sudo ifconfig en0 ether YOUR_ORIGINAL_MAC_ADDRESS_GOES_HERE'
@jjgod
jjgod / CCacheMacNinja.md
Last active October 31, 2023 06:57
Using ccache for Mac builds

Introduction

ccache is a compiler cache. It speeds up recompilation of C/C++ code by caching previous compilations and detecting when the same compilation is being done again. This often results in a significant speedup in common compilations, especially when switching between branches. This page is about using ccache on Mac with clang and ninja build system. If you want to use Xcode, please refer to the old CCacheMac page.

In order to use ccache with clang, you need to use the current git HEAD, since the most recent version (3.1.9) doesn't contain the patch needed for using chromium style plugin.

Installation

To install ccache with [homebrew](http://mxcl.

@cowboy
cowboy / javascript-type-stuff.js
Created February 16, 2011 16:13
JavaScript Type Stuff
// ============================================================
// Objects vs Primitives
// To make a long story short, use primitives wherever you can.
// ============================================================
// Primitive types: Null, Undefined, Number, Boolean, String.
var num1 = 9000,
num2 = new Number( 9000 ),
str1 = "hello world",
# Tips for jQuery Bug Patching
# There are some assumptions made here, one being that you're
# set up with some form of "localhost" http server and that it's running.
# - http://www.mamp.info/en/mamp/
# - sudo apt-get install apache2
# Get it running:
# On Mac:
/**
* Console object for BESEN
* @author Dmitry A. Soshnikov <dmitry.soshnikov@gmail.com>
*/
(function initConsole(global) {
// helpers
var getClass = Object.prototype.toString;
var timeMap = {};
#!/usr/bin/env ruby
require 'ftools'
require 'fileutils'
require 'rubygems'
require 'RMagick'
include Magick
require 'open3'
def merge( files = [] )