Skip to content

Instantly share code, notes, and snippets.

View bradjasper's full-sized avatar
💭
🚀 Building Focus, RemoteHabits and something new

Brad Jasper bradjasper

💭
🚀 Building Focus, RemoteHabits and something new
View GitHub Profile
if __name__ == "__main__":
doIt();
SubtlePatterns Bookmarklet is a quick and easy way to see patterns from http://subtlepatterns.com on your site.
Drag this link <a href="javascript:(function()%7Bvar%20newscript%3Ddocument.createElement(%27script%27)%3Bnewscript.type%3D%27text/javascript%27%3Bnewscript.async%3Dtrue%3Bnewscript.src%3D%27https://raw.github.com/bradjasper/subtle-patterns-bookmarklet/master/bookmarklet.js%3Fcb%3D%27%20%2B%20Math.random()%3B(document.getElementsByTagName(%27head%27)%5B0%5D%7C%7Cdocument.getElementsByTagName(%27body%27)%5B0%5D).appendChild(newscript)%3B%7D)()%3B">Subtle Patterns Bookmarklet</a> to your bookmarks bar, and click it to activate on any site you want to change backgrounds on.
Press left and right to move between patterns. The current pattern is displayed in the lower left corner of the browser.
Similar projects:
http://raphaeleidus.com/2011/06/29/background-patterns-bookmarklet
@bradjasper
bradjasper / gist:7344832
Created November 6, 2013 21:58
This tests aborting font files from TypeKit web fonts. This doesn't work as expected.
var page = require('webpage').create();
// Block fonts
var abort_content_types = [
"application/x-font-woff",
"font/woff",
"font/opentype",
];
// Default user agent won't work with TypeKit
@bradjasper
bradjasper / Test Google Fonts
Created November 6, 2013 21:56
This tests aborting font files from Google web fonts. This works as expected.
var page = require('webpage').create();
// Block fonts
var abort_content_types = [
"application/x-font-woff",
"font/woff",
"font/opentype",
];
// Default user agent won't work with TypeKit
# ANSI color codes
RESET="\[\033[0m\]" # reset
HICOLOR="\[\033[1m\]" # hicolor
UNDERLINE="\[\033[4m\]" # underline
INVERSE="\[\033[7m\]" # inverse background and foreground
FBLACK="\[\033[30m\]" # foreground black
FRED="\[\033[31m\]" # foreground red
FGREEN="\[\033[32m\]" # foreground green
FYELLOW="\[\033[33m\]" # foreground yellow
FBLUE="\[\033[34m\]" # foreground blue
2016-04-22T23:00:52.225Z 0f521c85-08de-11e6-acfd-2177bd93f70f Got createRecurringJob event
{
"input": {
"jobType": "urls",
"urls": [
"http://google.com"
]
},
"schedule": "rate(5 minutes)"
}

Keybase proof

I hereby claim:

  • I am bradjasper on github.
  • I am bradjasper (https://keybase.io/bradjasper) on keybase.
  • I have a public key ASC6HgChDmmMjR1--b3QX6n2L3i85MshbOXBX1kDiq69oQo

To claim this, I am signing this object:

@bradjasper
bradjasper / http-server.py
Last active September 27, 2020 08:59 — forked from leoleozhu/http-server.py
SimpleHTTPServer different port
#!/usr/bin/env python
import SimpleHTTPServer
import SocketServer
PORT = 8919
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", PORT), Handler)
@bradjasper
bradjasper / gist:b2af4762756a5df20524
Created February 14, 2015 00:50
Build, Archive & Export Mac App from command line (rather than Xcode)
#!/bin/bash
BASE_DIR=$HOME/Projects/focus
BUILD_DIR=$BASE_DIR/Builds
FOCUS_ARCHIVE=$BUILD_DIR/Focus.xcarchive
FOCUS_APP=$BUILD_DIR/Focus.app
echo "Building Focus..."
echo "Cleaning up old archive & app..."