Skip to content

Instantly share code, notes, and snippets.

🌴

Ryan Seys ryanseys

🌴
Block or report user

Report or block ryanseys

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
View README.md

This is a d3.js visualization of US zip codes.

Original zip code dataset from Geocommons.

5MB shapefile with properties such as zipcode, state, name, population, area, more.

http://geocommons.com/overlays/54893 (Thank you Bill Greer)

This converts it nicely:

@rickharrison
rickharrison / jekyll.nginxconf
Created Sep 2, 2013
Nginx server config with clean URLs for Jekyll.
View jekyll.nginxconf
server {
listen 80;
server_name www.yourdomain.com;
return 301 $scheme://yourdomain.com$request_uri;
}
server {
listen 80;
root /var/www/yourdomain.com;
@christianberg
christianberg / bootstrap.sh
Last active Apr 1, 2016
Script to install Docker on a Ubuntu 13.04 host
View bootstrap.sh
#/bin/bash
set -e
echo "=== Activating Firewall (only SSH allowed) ==="
ufw allow ssh
ufw --force enable
if [ ! -f /swapfile ]; then
echo "=== Activating swap ==="
fallocate -l 1G /swapfile
@shuhaowu
shuhaowu / mergerange.py
Last active Dec 15, 2015
Consider this public domain. This takes a sorted number range and merges the overlapping ones. If you just have a bunch of number ranges, you could always sort and then pass it in to this.
View mergerange.py
def merge_range_sorted(r):
"""Merges and sorts a range of numbers. Used for block merging.
Worse-case runtime:
O(n)
Args:
r: A **sorted**, from low to high, list of ranges in a tuple format.
Returns:
@X0nic
X0nic / disable-vagrant-time-sync.sh
Last active Jun 4, 2018
Disable vagrant time sync
View disable-vagrant-time-sync.sh
#List vms
VBoxManage list vms
#get status of time sync
VBoxManage getextradata <vm-name> VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled
#NOTE: Make sure to restart the VM after changing these settings.
#disable time sync
VBoxManage setextradata <vm-name> VBoxInternal/Devices/VMMDev/0/Config/GetHostTimeDisabled 1
@Barnabas
Barnabas / auth.jade
Last active Dec 10, 2015
Persona Express AngularJS module
View auth.jade
html(ng-app="persona")
body(ng-controller="PersonaCtrl")
div(ng-hide="verified")
button(ng-click="verify()") Verify Identity
div(ng-show="verified")
| Hello {{email}}
br
button(ng-click="logout()") Log Out
div(ng-show="error")
strong {{error}}
@jedp
jedp / gist:4062623
Last active Oct 12, 2015
try server and mercurial queues
View gist:4062623
# push to try
hg qref --message "try: -b do -p all -u all -t none"
hg push -f try
# refresh with name and bug info
hg phase -f --draft qbase:tip # if it complains about immutable revisions
hg qrefresh -m "Bug 876543 - blah blah blah. r=pqdbach"
@vnu
vnu / gist:3258553
Created Aug 4, 2012
Android dumpsys denial to access programmatically
View gist:3258553

How to log the dumpsys information periodically?

What is dumpsys and what are its benefits?

Dumpsys is a very interesting android shell command that dumps the state of various running services and also other system information on std output.

Benefits :

Retrieve various system information in a simple string representation Analyse the various stats like cpuinfo, batteryinfo, meminfo, wifi, location etc., to analyze the overall performance of the device and also the individual performance of various application and services.

@brandonb927
brandonb927 / osx-for-hackers.sh
Last active Feb 19, 2020
OSX for Hackers: Yosemite/El Capitan Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned.
View osx-for-hackers.sh
#!/bin/sh
###
# SOME COMMANDS WILL NOT WORK ON macOS (Sierra or newer)
# For Sierra or newer, see https://github.com/mathiasbynens/dotfiles/blob/master/.macos
###
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/5b3c8418ed42d93af2e647dc9d122f25cc034871/.osx
View gist:3135754

Hello there! This is a sample post for gist.io, a super-lightweight writing soapbox for hackers.

Now look up. Further. Above the post title. See that grey text with the gist ID?

Now back to me. That grey text is a link! Open that sucker in a new tab to see the source for this post. Also, I'm on a horse.

This is a major heading

If you peek at it with a web inspector, you'll see that it is a second-level heading. You can use first level headings, but they'll look just like the second level ones, and the gods of the HTML5 outlining algorithm will frown upon you.

You can’t perform that action at this time.