Skip to content

Instantly share code, notes, and snippets.

💭
🚀 Building Focus, RemoteHabits and something new

Brad Jasper bradjasper

💭
🚀 Building Focus, RemoteHabits and something new
Block or report user

Report or block bradjasper

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bradjasper
bradjasper / gist:b2af4762756a5df20524
Created Feb 14, 2015
Build, Archive & Export Mac App from command line (rather than Xcode)
View gist:b2af4762756a5df20524
#!/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..."
@bradjasper
bradjasper / http-server.py
Last active Apr 10, 2019 — forked from leoleozhu/http-server.py
SimpleHTTPServer different port
View http-server.py
#!/usr/bin/env python
import SimpleHTTPServer
import SocketServer
PORT = 8919
Handler = SimpleHTTPServer.SimpleHTTPRequestHandler
httpd = SocketServer.TCPServer(("", PORT), Handler)
View keybase.md

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:

View gist:92702a740408a22c325ead0b736120ce
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)"
}
View gist:7436681
# 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
@bradjasper
bradjasper / Test Google Fonts
Created Nov 6, 2013
This tests aborting font files from Google web fonts. This works as expected.
View Test Google Fonts
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 / gist:7344832
Created Nov 6, 2013
This tests aborting font files from TypeKit web fonts. This doesn't work as expected.
View gist:7344832
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
View gist:4221963
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
View gist:1162718
if __name__ == "__main__":
doIt();
View show
# Usage: show <local-port> <subdomain>
function show() {
DOMAIN=".tekacs.com"
REMOTE="$2$DOMAIN"
ssh -tR 1080:127.0.0.1:$1 vps "sudo ssh -Nl \$USER -L $REMOTE:80:127.0.0.1:1080 localhost"
}
You can’t perform that action at this time.