Skip to content

Instantly share code, notes, and snippets.

View baalexander's full-sized avatar

Brandon Alexander baalexander

View GitHub Profile
@marktheunissen
marktheunissen / pedantically_commented_playbook.yml
Last active April 26, 2024 23:26 — forked from phred/pedantically_commented_playbook.yml
Insanely complete Ansible playbook, showing off all the options
This playbook has been removed as it is now very outdated.
@phred
phred / pedantically_commented_playbook.yml
Last active November 3, 2023 01:55
Very complete Ansible playbook, showing off all the options
---
####
#### THIS IS OLD AND OUTDATED
#### LIKE, ANSIBLE 1.0 OLD.
####
#### PROBABLY HIT UP https://docs.ansible.com MY DUDES
####
#### IF IT BREAKS I'M JUST SOME GUY WITH
#### A DOG, OK, SORRY
####
@damiancarrillo
damiancarrillo / format.awk
Created October 5, 2011 22:04
Formats Objective-C code (unfinished)
#! /usr/bin/env awk -f
BEGIN {
shiftWidth = 4
expandedTab = createExpandedTab(4)
}
{
s = stripTrailingWhitespace($0)
s = expandTabs(s, expandedTab)
@baalexander
baalexander / npm_commands.bash
Last active September 27, 2015 00:07
Useful commands for NPM
# Test a package locally before publishing to NPM:
# Install the package in the global space
npm install . -g
# Package should show up in list
npm ls -g
# Can view contents of the installed package with
ls ~/.npm/<package name>
# Publish a package to NPM
# Inside the root directory of the package
@baalexander
baalexander / git_commands.bash
Last active September 24, 2015 15:08
Useful git commands
# Sorts users by number of commits
# Example output:
# 85 baalexander
# 59 elaw
# 58 jsmartt
# See https://github.com/blog/766-jeff-king-peff-is-a-githubber
git log --pretty=format:%aN | sort | uniq -c | sort -rn
# Alternative
git shortlog -sn
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active March 8, 2024 02:11
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl https://www.npmjs.org/install.sh | sh