Skip to content

Instantly share code, notes, and snippets.

View supermensa's full-sized avatar

Supermensa supermensa

View GitHub Profile
@jkosoy
jkosoy / gist:5379904
Last active June 20, 2023 14:06
Raspberry Pi setup

Raspberry Pi setup

Just wanted a quick start guide for myself so that I wouldn't have to keep rooting through Google to remember all this stuff. Hopefully it helps other people.

If you had other ideas or suggestions please leave a comment.

Useful things to own before you buy a Pi

The first time I bought a Pi I was enormously frustrated with myself because I didn't own all of this stuff. Kept having to order things off of Amazon and wait to get started... very irritating. This is all good stuff to have laying around anyway:

@thomastraum
thomastraum / download_gists.js
Created March 23, 2013 12:26
Gist to download all your gists
var request = require('request')
, path = require('path')
, fs = require('fs')
, url = "https://api.github.com/users/thomastraum/gists"
, savepath = './gists';
request(url, function (error, response, body) {
if (!error && response.statusCode == 200) {
@tmayr
tmayr / gist:5190565
Created March 18, 2013 20:34
Foundation Topbar IE8 Fix
.lt-ie9 .top-bar {
background: #2f2f2f;
*zoom: 1;
overflow: visible;
}
.lt-ie9 .top-bar:before, .lt-ie9 .top-bar:after {
content: " ";
display: table;
}
.lt-ie9 .top-bar:after { clear: both; }
@alexbeletsky
alexbeletsky / Feedback.js
Created November 8, 2012 07:38
Baby steps to Backbone - step 2 - Validation
var Feedback = Backbone.Model.extend({
url: '/feedback',
defaults: {
'email': '',
'website': '',
'feedback': ''
},
@johnpolacek
johnpolacek / gist:3827270
Last active January 20, 2023 15:46
Prevent FOUC
<!-- Prevent FOUC (flash of unstyled content) - http://johnpolacek.com/2012/10/03/help-prevent-fouc/ -->
<style type="text/css">
.no-fouc {display: none;}
</style>
<script type="text/javascript">
document.documentElement.className = 'no-fouc';
// add to document ready: $('.no-fouc').removeClass('no-fouc');
</script>
@robinsloan
robinsloan / langoliers.rb
Last active April 7, 2024 13:22
The Langoliers, a tweet deletion script
require "rubygems"
require "twitter"
require "json"
# things you must configure
TWITTER_USER = "your_username"
MAX_AGE_IN_DAYS = 1 # anything older than this is deleted
# get these from dev.twitter.com
CONSUMER_KEY = "your_consumer_key"
@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
@JamesMGreene
JamesMGreene / NoRootNamespaceEnforcement.js
Created July 8, 2012 12:14
Shortcut functions to easily create deep namespaces in JavaScript
(function(exports) {
/**
* @namespace My namespace!
*/
exports.MyNS = {
/**
* Returns the namespace object specified and creates it if it doesn't exist.
* Does NOT enforce that any requested namespace is attached to the MyNS root namespace.
*
* @param {String} nsString A string representation of the desired namespace.
@rutger1140
rutger1140 / gist:3046805
Created July 4, 2012 11:12
Prevent console.log errors in IE
// Prevent console.log errors
if (typeof console=="undefined") {
console={log:function(A){return;}}
}
@nunosans
nunosans / html-head-boilerplate.html
Last active March 8, 2024 18:31
HTML Head Boilerplate & Reference
<!doctype html>
<html>
<head>
<!-- Priority tags. These must come first. -->
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge; chrome=1"> <!-- Render Chrome if available or using latest version of Internet Explorer (Recommended). -->
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
<!-- Document Title -->
<title>Page Title</title>
<!-- Allows control over where resources are loaded from. Place as early in the document as possible, only applies to content below this tag. -->