Skip to content

Instantly share code, notes, and snippets.

View PendragonDevelopment's full-sized avatar
🏠
Working from home

Jordan Burke PendragonDevelopment

🏠
Working from home
View GitHub Profile
# The following is a quick and dirty example of uploading to vimeo using ruby
# It assumes that you already have an access token for a user
require 'net/http'
require 'httparty'
ACCESS_TOKEN = "your access token here"
auth = "Bearer #{ACCESS_TOKEN}"
# get ticket
@nathansmith
nathansmith / chipotle_lunch.js
Created February 8, 2012 18:10
Eating at Chipotle?
// I crack myself up.
// Typed this to coworkers in team chat:
person.eat(food, function() {
if (typeof food === 'chipotle') {
// Yum!
setTimeout(function() {
// Oh noes!
// http://www.hulu.com/watch/10304/saturday-night-live-colon-blow
@csswizardry
csswizardry / tagged.css
Created August 7, 2012 19:09
Leaving tags in CSS files to find similar chunks of code
/*------------------------------------*\
$NAV
\*------------------------------------*/
/*
TAGS: ^lists ^navigation ^text
*/
/*
As per csswizardry.com/2011/09/the-nav-abstraction
*/
.nav{
@max-mapper
max-mapper / readme.md
Last active October 12, 2015 10:17
introduction to node
@nathansmith
nathansmith / example.zshrc
Created November 19, 2012 23:38
Used to export flat HTML, and put into a Zip file
# Serve & Export commands
alias client_site='cd ~/projects/client-site && serve'
alias client_site_html='cd ~/projects && rm -rf client-site-html && cd ~/projects/client-site && serve export ../client-site-html && cd ~/projects/client-site-html && zip -r templates.zip ./* && open index.html'
@nathansmith
nathansmith / #1 manifest_time.rb
Last active December 15, 2015 11:49
Used to cache-bust <html manifest="..."> locally. Turns static when deployed.
# Used to cache-bust <html manifest="..."> locally
def manifest_time
t = Time.now
year = t.year
month = t.month
day = t.day
hour = t.hour
min = t.min
# Seconds changes too frequently for
@coreyp1
coreyp1 / Install WAMP Drupal and Drush on Windows 7.txt
Created March 9, 2011 05:19
Install WAMP Drupal and Drush on Windows 7.txt
Installation Steps
PART 1: INSTALLING & CONFIGURING APACHE, MYSQL, & PHP ON WINDOWS (WAMP)
----------------------------------------------------------------------------------
1. Download WampServer from http://www.wampserver.com/en/ & install.
C:\wamp is a good location. Do not run WampServer yet.
2. Configure MySQL. The default MySQL configuration file is very limiting. Choose one
of the model config files that best suits your system and copy & paste it to "wampserver.conf".
@timdorr
timdorr / README.md
Created May 31, 2016 22:14
A basic Sidekiq rate limiter

Don't copypasta this!

Note that this is very purpose-built. The job args in particular depend on a unique key being in the first position.

There is also plenty of brittle code all over the place.

Instead, use this as a guide for how you might build your own. A lot of the parts are the same between implementations.

@adactio
adactio / mediaquerycolums.html
Created January 12, 2012 16:55
Multiple columns dependent on media queries that test for height as well as width.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Media Query Multiple Columns</title>
<meta name="viewport" content="width=device-width, intial-scale=1">
<style>
@media all and (min-width: 40em) and (min-height: 36em) {
[role="main"] {
-webkit-column-count: 2;
@junosuarez
junosuarez / tap.js
Created September 11, 2012 23:19
Easily support tap events without modifying your click event handlers
/*global define: false, window: false */
define(['jquery'], function ($) {
'use strict';
return function () {
/* Begin monkey-patch Tap event support into $ */
var x = 0,
y = 0,
threshold = 40,
// Sometimes there is lag between the last update and touchend.