Skip to content

Instantly share code, notes, and snippets.

View funkytaco's full-sized avatar

Luis Gonzalez funkytaco

View GitHub Profile
@erikroyall
erikroyall / backup.sh
Created April 15, 2015 13:40
Ubuntu Back Up Script
dpkg --get-selections > ~/Package.list
sudo cp -R /etc/apt/sources.list* ~/
sudo apt-key exportall > ~/Repo.keys
rsync --progress /home/`whoami` /path/to/user/profile/backup/here
@bean5
bean5 / commit-msg
Last active May 9, 2022 10:10 — forked from remi/commit-msg
#!/usr/bin/env ruby
# 1. Install hunspell
# $ brew install hunspell
# 2. Download a dictionary and install it in a path listed by `hunspell -D`
# $ open http://wiki.services.openoffice.org/wiki/Dictionaries
# 3. Move this file into your repository
# $ mv commit-msg /path/to/repo/.git/hooks
@CS1000
CS1000 / JamExchange.js
Last active July 17, 2017 12:50
JamExchange Room @so Live Radio like Player with "User Requests" (YouTube only, UserScript)
// ==UserScript==
// @name JamExchange Player
// @namespace jamexchange
// @description JamExchange Room @SO Live Radio like Player with "User Requests" (YoutTube only)
// @include http://chat.stackoverflow.com/rooms/39426/*
// @version 1.1.0
// @grant none
// ==/UserScript==
/*
@danawoodman
danawoodman / 0-react-hello-world.md
Last active March 9, 2024 00:32
React Hello World Examples

React "Hello World" Examples

Below are a small collection of React examples to get anyone started using React. They progress from simpler to more complex/full featured.

They will hopefully get you over the initial learning curve of the hard parts of React (JSX, props vs. state, lifecycle events, etc).

Usage

You will want to create an index.html file and copy/paste the contents of 1-base.html and then create a scripts.js file and copy/paste the contents of one of the examples into it.

@aaronjudd
aaronjudd / Dockerfile
Created September 18, 2014 16:21
Meteor Dockerfile with imagemagick and phantomjs
############################################################
# Builds a Meteor 0.9.x+ application Docker image
#
# See: http://docs.docker.io/
#
# Important: Best to run from a clean directory that hasn't had meteor run in it.
# Important: packages/<pkg>/.npm and .build* should not exist
#
# Example usage:
# cd appdir #in app dir
@sebmarkbage
sebmarkbage / ElementFactoriesAndJSX.md
Last active May 17, 2022 11:06
New React Element Factories and JSX

New React Element Factories and JSX

In React 0.12, we're making a core change to how React.createClass(...) and JSX works.

If you're using JSX in the typical way for all (and only) React components, then this transition will be seamless. Otherwise there are some minor breaking changes described below.

The Problem

Handlebars is a semantic web template system, started by Yehuda Katz in 2010.
Handlebars.js is a superset of Mustache, and can render Mustache templates in addition to Handlebars templates.
More: http://handlebarsjs.com/
1. Expressions.
1.1 Basic usage.
<html>
<head>
<title>photobooth</title>
<link href="bootstrap/css/bootstrap.min.css" rel="stylesheet" media="screen">
</head>
<body>
<div class="container">
<div class="row-fluid">
<span>Step 1</span>
<img src='http://placehold.it/125x125&text=lomo' onClick='setFilter("lomo")'>
@elijahmanor
elijahmanor / fake-server-unit-test.js
Last active August 28, 2018 09:23
Unit Test like a Secret Agent with Sinon.js
describe("getTweets - Server", function () {
var server, fakeData = [ /* ... */ ];
before(function () {
// Doesn’t work :( It’s JSONP!
server = sinon.fakeServer.create();
server.respondWith(
"GET",
"https://api.twitter.com/.../elijahmanor.json?count=5",
[200, { "Content-Type": "application/json" }, JSON.stringify(fakeData)]
@gregology
gregology / dashboard
Last active December 8, 2020 14:19
Service script for dashing. Update DASHING_DIR variable, add this file to /etc/init.d/ , chmod to 755, and let update rc.d with $ sudo update-rc.d dashboard defaults This scripts stops the dashing service with "killall thin" which will kill all thin services running on your server.
#!/bin/bash
# Dashing service
# Add this file to /etc/init.d/
# $ sudo cp dashboard /etc/init.d/
# Update variables DASHING_DIR, GEM_HOME, & PATH to suit your installation
# $ sudo nano /etc/init.d/dashboard
# Make executable
# $ sudo chmod 755 /etc/init.d/dashboard
# Update rc.d
# $ sudo update-rc.d dashboard defaults