Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View matthewhochler's full-sized avatar

Matt H matthewhochler

View GitHub Profile
@philippschmitt
philippschmitt / countPhotosForGeoLocation
Last active May 13, 2020 22:02
Count all photos that are available on Flickr and Panoramio for a specific geo fence
/*
This script counts all photos that are available on Flickr and Panoramio for a specific geo fence and returns a JSON object with the data.
For convenience it's embedded in a little node.js server so that you can upload it to your server and use it as an API.
Here's an example url with all query attributes prefilled. Please use your own Flickr API key!
The location is the Berlin TV Tower (http://en.wikipedia.org/wiki/Fernsehturm_Berlin)
Example URL: http://piccounter-philippschmitt.rhcloud.com/?lat=52.520732&lon=13.409537&latRes=0.00015&lonRes=0.0003&flickrKey=60d03369d3e92b4578c8f2df2de5af66
#!/usr/bin/env ruby
# encoding: utf-8
#
# Download 1136x1136 screenshots and 512x512 icon from iTunes for a list of
# search terms.
#
# Jon Roes <jroes@heroku.com>
#
# Example:
# $ iosgfx search_terms.txt
@ddeville
ddeville / gist:dc6ba4346604ab4d6b65
Created July 12, 2014 21:49
Present the bookmark creation window in Spillo and populate it with the content from the frontmost tab in Safari
tell application "Safari"
set current_tab to current tab of front window
set tab_title to name of current_tab
set tab_address to URL of current_tab
tell application "Spillo"
show create bookmark panel with properties {url:tab_address, title:tab_title}
end tell
end tell
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active April 20, 2024 16:52
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

javascript:
// Take the current page URL and put it in a variable called url
var url = document.URL;
// Create a new variable called tweetbotProfile and replace the mobile twitter url with the Tweetbot x-callback-url scheme
var tweetbotProfile = url.replace(/https:\/\/(mobile.)?twitter.com\//,"tweetbot:///user_profile/");
// Go to the new URL in tweetbotProfile
window.location = tweetbotProfile;
javascript:
// Take the current page URL and put it in a variable called url
var url = document.URL;
// Create a new variable called tweetbotProfile and replace the mobile twitter url with the Tweetbot x-callback-url scheme
var tweetbotProfile = url.replace("https://mobile.twitter.com/","tweetbot:///user_profile/");
// Go to the new URL in tweetbotProfile
window.location = tweetbotProfile;
@lttlrck
lttlrck / gist:9628955
Created March 18, 2014 20:34
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@therealtakeshi
therealtakeshi / Mixlr Toolkit
Last active February 15, 2021 01:07
Dark Theme for Mixlr
// by @therealtakeshi
// Setting up the options for localStorage;
var toStore = {
emo:false,
heart:false,
sounds:false,
msgLimit:false,
msgAllowed:200,
colorComment:"#E0A666",
colorUsername:"#D18026",
@drdrang
drdrang / WeatherUnderground.py
Created February 23, 2014 06:07
Pythonista script for generating and displaying the local weather.
#!/usr/bin/python
import json
import requests
import time
from datetime import datetime
import location
import webbrowser
import BaseHTTPServer
@gruber
gruber / Liberal Regex Pattern for Web URLs
Last active April 22, 2024 19:02
Liberal, Accurate Regex Pattern for Matching Web URLs
The regex patterns in this gist are intended only to match web URLs -- http,
https, and naked domains like "example.com". For a pattern that attempts to
match all URLs, regardless of protocol, see: https://gist.github.com/gruber/249502
# Single-line version:
(?i)\b((?:https?:(?:/{1,3}|[a-z0-9%])|[a-z0-9.\-]+[.](?:com|net|org|edu|gov|mil|aero|asia|biz|cat|coop|info|int|jobs|mobi|museum|name|post|pro|tel|travel|xxx|ac|ad|ae|af|ag|ai|al|am|an|ao|aq|ar|as|at|au|aw|ax|az|ba|bb|bd|be|bf|bg|bh|bi|bj|bm|bn|bo|br|bs|bt|bv|bw|by|bz|ca|cc|cd|cf|cg|ch|ci|ck|cl|cm|cn|co|cr|cs|cu|cv|cx|cy|cz|dd|de|dj|dk|dm|do|dz|ec|ee|eg|eh|er|es|et|eu|fi|fj|fk|fm|fo|fr|ga|gb|gd|ge|gf|gg|gh|gi|gl|gm|gn|gp|gq|gr|gs|gt|gu|gw|gy|hk|hm|hn|hr|ht|hu|id|ie|il|im|in|io|iq|ir|is|it|je|jm|jo|jp|ke|kg|kh|ki|km|kn|kp|kr|kw|ky|kz|la|lb|lc|li|lk|lr|ls|lt|lu|lv|ly|ma|mc|md|me|mg|mh|mk|ml|mm|mn|mo|mp|mq|mr|ms|mt|mu|mv|mw|mx|my|mz|na|nc|ne|nf|ng|ni|nl|no|np|nr|nu|nz|om|pa|pe|pf|pg|ph|pk|pl|pm|pn|pr|ps|pt|pw|py|qa|re|ro|rs|ru|rw|sa|sb|sc|sd|se|sg|sh|si|s