Skip to content

Instantly share code, notes, and snippets.

Avatar

Aaron Buchanan aaronbuchanan

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

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 Aug 29, 2015
Tumblr Icomoon Font Icons Not Rendering Properly In Firefox
View gist:11190993

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:

View gist:9283770
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 Nov 18, 2020
Serving WEBP with nginx conditionally.
View nginx-webp-sample.conf
user www-data;
http {
##
# Basic Settings
##
sendfile on;
tcp_nopush on;
View scrape.js
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 Dec 9, 2013
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
View US Zip Codes from 2013 Government Data
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
@bhurlow
bhurlow / jpost
Last active Aug 10, 2017
alias so you can pipe into curl to post json
View jpost
#!/bin/bash
curl -X POST -d @- $1 --header "Content-Type:application/json"
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active Jan 16, 2021
A badass list of frontend development resources I collected over time.
View frontendDevlopmentBookmarks.md
@wrburgess
wrburgess / gist:5528649
Last active Jan 12, 2021
Backup Heroku Postgres database and restore to local database
View gist:5528649

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 Aug 12, 2020
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/
View MoveCamera.cs
// 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
You can’t perform that action at this time.