Skip to content

Instantly share code, notes, and snippets.

How Do I Into Git?

a helpful primer for users sick of git's poorly-named commands

I've used Git since 2011, and this is the stuff that I've always had to Google to remember. I hope it helps you not hate Git so much.

Learning About the Repo

Learning About History

@shu8
shu8 / youtubeVideoHider.user.js
Last active January 22, 2019 23:00
Hide YouTube videos (only listen to the audio)
// ==UserScript==
// @name Youtube Video hider (to only listen to audio)
// @namespace http://stackexchange.com/users/4337810/
// @version 1.1
// @description A userscript that hides most of the video content on youtube, so you can listen rather than watch!
// @author ᔕᖺᘎᕊ (http://stackexchange.com/users/4337810/)
// @match *://*.youtube.com/*
// @run-at document-end
// @grant none
// ==/UserScript==
@mjackson
mjackson / .gvimrc
Last active November 1, 2019 07:43
My vim setup
set guifont=Monaco:h14
set background=dark
set transparency=3
color base16-chalk
class Profile extends React.Component {
// etc.
}
function createContainer (Component) {
return class extends React.Component {
render () {
return <Component {...this.props}/>
}
}

Hi Zach :D

Modals are funny beasts, usually they are a design cop-out, but that's okay, designers have to make trade-offs too, give 'em a break.

First things first, I'm not sure there is such thing as a "simple" modal that is production ready. Certainly there have been times in my career I tossed out other people's "overly complex solutions" because I simply didn't understand the scope of the problem, and I have always loved it when people who have a branch of experience that I don't take the time

@gaearon
gaearon / ReduxMicroBoilerplate.js
Last active March 26, 2020 00:35
Super minimal React + Redux app
import React, { Component } from 'react';
import { createStore, combineReducers, applyMiddleware, bindActionCreators } from 'redux';
import { provide, connect } from 'react-redux';
import thunk from 'redux-thunk';
const AVAILABLE_SUBREDDITS = ['apple', 'pics'];
// ------------
// reducers
// ------------
// include this file at the very beginning
import makeFinalStore from 'alt/utils/makeFinalStore'
// you'll also need to import your alt instance from wherever...
import alt from './somewhere/in/your/file/system/alt'
// this loads the app state from local storage and bootstraps it
const state = LocalStorage.getItem('my_app_state')
alt.bootstrap(state)
vars:
starfighters:
- username: patrick
github: patio11
name: "Patrick McKenzie"
- username: thomas
github: tqbf
name: "Thomas Ptacek"
- username: erin
github: boboTjones
@patio11
patio11 / ansible-snippet.yaml
Created July 9, 2015 02:44
Create an account on every box using the list of employees; initialize with their Github SSH keys
vars:
starfighters:
- username: patrick
github: patio11
name: "Patrick McKenzie"
- username: thomas
github: tqbf
name: "Thomas Ptacek"
- username: erin
github: boboTjones
@jhngrant
jhngrant / postgresql-debugger-install-ubuntu
Last active January 17, 2025 22:54
Installing the PL/pgSQL Debugger Extension (pldbgapi) for pgAdmin III on PostgreSQL 9.4 and Ubuntu 14.10
# PostgreSQL can be on a remote server but you'll need root privileges in Linux and superuser in PostgreSQL.
# First install build tools
sudo su
aptitude install build-essential
aptitude install postgresql-server-dev-9.4
# Clone and build the PL/pgSQL server-side debugger