Skip to content

Instantly share code, notes, and snippets.

View aaronbuchanan's full-sized avatar

Aaron Buchanan aaronbuchanan

View GitHub Profile
@mbleigh
mbleigh / comparison.md
Last active November 4, 2015 04:17
Comparing the features of Divshot and Firebase static web hosting.

Divshot/Firebase Hosting Feature Comparison

Feature Divshot Firebase
Global CDN
Custom Domains
SSL Supported
Command-Line Tools
Simple Rollback
Free w/ Firebase
@subatomicceo
subatomicceo / gist:11190993
Last active August 29, 2015 14:00
Tumblr Icomoon Font Icons Not Rendering Properly In Firefox

Problem

While working on The Giver Movie's Official Tumblr I ran across a problem. It seems that my icomoon font icons failed to render properly in Firefox. The issue is due to the fact that Firefox doesn't allow cross-domain fonts. The traditional solve is to add the following to your .htaccess: Header set Access-Control-Allow-Origin "*".

However, I have no control over the .htaccess due to the fact that my code will be hosted on Tumblr.com. So, I attempted to upload the font files through Tumblr's static upload page. This also failed because Firefox treats subdomains the same as cross-domains.

Solution

Below is my original snippet:

This fix is from substack in the comments on here:
http://blog.npmjs.org/post/78085451721/npms-self-signed-certificate-is-no-more
(apologies for being unable to permalink directly to the comment)
-----
In travis-ci you can work around this by setting:
before_install:
- npm config set ca ""
@uhop
uhop / nginx-webp-sample.conf
Last active November 3, 2023 12:09
Serving WEBP with nginx conditionally.
user www-data;
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
var request = require('request');
var _ = require('underscore');
var url = "http://forecast.weather.gov/product.php?site=NWS&issuedby=OKX&product=PNS&format=txt&version=1&glossary=0";
var header = "********************STORM TOTAL SNOWFALL********************";
var footer = "**********************24 HOUR SNOWFALL**********************";
request(url, function(err, resp, body) {
if (err) throw err;
@erichurst
erichurst / US Zip Codes from 2013 Government Data
Created December 9, 2013 23:00
All US zip codes with their corresponding latitude and longitude coordinates. Comma delimited for your database goodness. Source: http://www.census.gov/geo/maps-data/data/gazetteer.html
This file has been truncated, but you can view the full file.
ZIP,LAT,LNG
00601,18.180555, -66.749961
00602,18.361945, -67.175597
00603,18.455183, -67.119887
00606,18.158345, -66.932911
00610,18.295366, -67.125135
00612,18.402253, -66.711397
00616,18.420412, -66.671979
00617,18.445147, -66.559696
00622,17.991245, -67.153993
@bhurlow
bhurlow / jpost
Last active October 30, 2021 19:05
alias so you can pipe into curl to post json
#!/bin/bash
curl -X POST -d @- $1 --header "Content-Type:application/json"
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active May 7, 2024 01:27
A badass list of frontend development resources I collected over time.
@wrburgess
wrburgess / gist:5528649
Last active November 24, 2022 15:29
Backup Heroku Postgres database and restore to local database

Grab new backup of database

Command: heroku pgbackups:capture --remote production

Response: >>> HEROKU_POSTGRESQL_COLOR_URL (DATABASE_URL) ----backup---> a712

Get url of backup download

Command: heroku pgbackups:url [db_key] --remote production

@JISyed
JISyed / MoveCamera.cs
Last active November 29, 2022 11:24
Camera movement script in Unity3D. Supports rotating, panning, and zooming. Attach to the main camera. Tutorial explaining code: http://jibransyed.wordpress.com/2013/02/22/rotating-panning-and-zooming-a-camera-in-unity/
// Credit to damien_oconnell from http://forum.unity3d.com/threads/39513-Click-drag-camera-movement
// for using the mouse displacement for calculating the amount of camera movement and panning code.
using UnityEngine;
using System.Collections;
public class MoveCamera : MonoBehaviour
{
//
// VARIABLES