Skip to content

Instantly share code, notes, and snippets.

@tbranyen
tbranyen / _usage.md
Last active August 15, 2024 21:13
OpenWeatherMap / Weather Icons integration
  1. Include Weather Icons in your app: https://github.com/erikflowers/weather-icons

  2. Include the below JSON in your application, for example purposes, lets assume it's a global named weatherIcons.

  3. Make a request to OpenWeatherMap:

req = $.getJSON('http://api.openweathermap.org/data/2.5/weather?q=London,uk&callback=?');
@erwaller
erwaller / README.md
Last active December 20, 2015 11:29
3D Seating Charts
@jamesmosier
jamesmosier / index.html
Created November 21, 2012 15:40
A CodePen by Erick Arbe. The Backside Menu Flip - A responsive navigation pattern whereas the nav (under 768px) is located on the "backside" of the page content.
<div id="page_container">
<div id="main_content">
<div class="front face">
<!-- ALL THE SITE CONTENT GOES HERE -->
<header class="clearfix">
@redoPop
redoPop / tzAbbr.js
Last active May 17, 2024 04:05
JavaScript: friendly timezone abbreviations in the client ("EDT", "CST", "GMT", etc.)
/*
Given a date, tzAbbr returns a short, friendly name for the
user's time zone on that date, or an empty string if their
client's Intl support is missing or incomplete.
For example, a user in New York might see:
tzAbbr(new Date()) // => "EST"
Time zones are locale-dependent. Users traveling outside of
@chensoren
chensoren / gist:3081970
Created July 10, 2012 08:11
nodejs AES encrypt and decrypt
var crypto = require('crypto');
var AESCrypt = {};
AESCrypt.decrypt = function(cryptkey, iv, encryptdata) {
encryptdata = new Buffer(encryptdata, 'base64').toString('binary');
var decipher = crypto.createDecipheriv('aes-256-cbc', cryptkey, iv),
decoded = decipher.update(encryptdata);
@teradyne
teradyne / RazorEngine_Example_Template.cs
Created May 14, 2012 23:34
RazorEngine Example Template
//using the RazorEngine @http://razorengine.codeplex.com/
// I am using this with ASP.NET forms (.NET 4.0) for email templates
// 1. Email HTML Templates Location:
// ~/templates/email/MyEmailTemplate.cshtml (name something useful like Page, Master where email is being sent)
//Helper methods - put this shit in a common helper class like below:
using RazorEngine;
@tonkapark
tonkapark / bigcartel_to_shopify_csv.rb
Created August 3, 2011 18:06
Generate a products csv file to make it easier to migrate from Big Cartel to Shopify
#script created by Matt Anderson, http://tonkapark.com
require 'rubygems'
require 'bigcartel'
require 'csv'
# SET YOUR BIGCARTEL ID HERE
STORE = 'ugmonk'
# SET THE BEST NAME FOR ANY DROP DOWN OPTIONS