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 / 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 LICENSE
Copyright (c) 2013 Jamz Tang <jamz@jamztang.com>
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is furnished
to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
View itunesicon.rb
#!/usr/bin/ruby
# encoding: utf-8
#
# Grab iTunes Icon - Brett Terpstra 2014 <http://brettterpstra.com>
#
# Retrieve an iOS app icon at the highest available resolution
# All arguments are combined to create an iTunes search
# The icon for the first result, if found, is written to a filename based on search terms
#
# example:
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"
}
View mixpanel.py
# This isn't perfect for high traffic sites, if you need something more production ready
# please tell us or stay tuned as we will open it up shortly.
import subprocess
import base64
import simplejson
def track(event, properties=None):
"""
A simple function for asynchronously logging to the mixpanel.com API.
You can’t perform that action at this time.