Skip to content

Instantly share code, notes, and snippets.

View chadxz's full-sized avatar

Chad McElligott chadxz

View GitHub Profile
@isaacs
isaacs / node-and-npm-in-30-seconds.sh
Last active July 21, 2024 01:20
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
@chetan
chetan / yardoc_cheatsheet.md
Last active May 10, 2024 02:53
YARD cheatsheet
@hongymagic
hongymagic / pr.md
Last active December 15, 2017 09:50 — forked from piscisaureus/pr.md
Checkout pull-requests from Atlassian Stash without adding remote

Locate the section for your stash remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@stash.internal:private/repository.git

Now add the line fetch = +refs/pull-requests/*:refs/remotes/origin/pull-requests/* to this section. Obviously, change the stash url to match your project's URL. It ends up looking like this:

@benzado
benzado / vault-merge.sh
Last active June 23, 2023 01:04
A shell script for merging encrypted Ansible vault files in a git repository
#!/bin/sh
# vault-merge
# Benjamin Ragheb <ben@benzado.com>
# This shell script handles conflicts generated by attempts to merge encrypted
# Ansible Vault files. Run `git merge` as usual; when git warns of a merge
# conflict, run this command to attempt a merge on the unencrypted versions of
# the file. If there are conflicts, you will be given a chance to correct them
# in $EDITOR.
@chadxz
chadxz / StartupActivity.java
Last active November 17, 2015 20:19
Registering a push token with respoke-sdk-android
/**
* Sorry if there are some imports or bits missing that are needed
* to make sense of this. I'm copy/pasting from a working example and
* trying to tease out things that are not relevant to push notification
* registration.
*/
import android.app.Fragment;
import android.app.FragmentManager;
import android.content.Context;
import android.content.Intent;
@leedm777
leedm777 / WebRTC-Standards.md
Last active December 4, 2015 19:52
If you start digging into WebRTC, here's all the stuff you'll run into
@bmhatfield
bmhatfield / .profile
Last active June 18, 2024 09:38
Automatic Git commit signing with GPG on OSX
# In order for gpg to find gpg-agent, gpg-agent must be running, and there must be an env
# variable pointing GPG to the gpg-agent socket. This little script, which must be sourced
# in your shell's init script (ie, .bash_profile, .zshrc, whatever), will either start
# gpg-agent or set up the GPG_AGENT_INFO variable if it's already running.
# Add the following to your shell init to set up gpg-agent automatically for every shell
if [ -f ~/.gnupg/.gpg-agent-info ] && [ -n "$(pgrep gpg-agent)" ]; then
source ~/.gnupg/.gpg-agent-info
export GPG_AGENT_INFO
else
@imjasonh
imjasonh / README.md
Last active August 31, 2022 01:47
Scrape GH dep graph to find dependents

This scrapes GitHub's dep graph page to find dependents of a repo, and writes it to a file for processing.

This is useful because GitHub's API doesn't currently support querying dependents, and the page in the UI is not sorted.

pkg.go.dev also shows dependents per-Go-package, including non-GitHub repos, but it's not sorted in any useful way to discover "popular" dependents.

Lines in the output are [repo] [stars] [forks]

It's incomplete and could probably be improved, but it scratches my itch. Feel free to fork it and do what you want.

@belgattitude
belgattitude / ci-yarn-install.md
Last active July 22, 2024 09:27
Composite github action to improve CI time with yarn 3+ / node-modules linker.