Skip to content

Instantly share code, notes, and snippets.

View ryanseys's full-sized avatar
🌴

Ryan Seys ryanseys

🌴
View GitHub Profile
@jefffriesen
jefffriesen / README.md
Last active March 13, 2024 17:10
US Zip Codes

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 September 2, 2013 07:41
Nginx server config with clean URLs for Jekyll.
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 April 1, 2016 12:20
Script to install Docker on a Ubuntu 13.04 host
#/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 December 15, 2015 12:09
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.
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 February 4, 2022 04:52
Disable vagrant time sync
#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 December 10, 2015 05:18
Persona Express AngularJS module
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 October 12, 2015 17:37
try server and mercurial queues
# 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 August 4, 2012 16:07
Android dumpsys denial to access programmatically

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 March 27, 2024 06:33
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.
#!/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
@idan
idan / gist:3135754
Created July 18, 2012 11:50
A Sample Post

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.