Skip to content

Instantly share code, notes, and snippets.

View jakebrinkmann's full-sized avatar

Jake Brinkmann jakebrinkmann

View GitHub Profile
@jakebrinkmann
jakebrinkmann / check_github_status.sh
Created November 23, 2016 22:58
Query all public repos in an account and their modified ("pushed_at") times. To make a pretty table, run as: `bash check_github_status.sh | column -t`
while read p; do # For each Github account
# use auth to avoid getting locked out for too many requests per hour :)
CURL='curl -s -u username:password'
# List all repos within an account
REPOURLS=$($CURL $p | grep '"url": "https://api.github.com/repos' | sed 's/.*"\(https.*\)",/\1/')
for URL in $REPOURLS; do
# Get all the info
REPOINFO=$($CURL $URL)
# Find the "full name", including organization
REPONAME=( $(echo "$REPOINFO" | grep full_name | sed 's/.*:\s"\(.*\)",/\1/') )
@jakebrinkmann
jakebrinkmann / Vagrantfile
Created December 1, 2016 22:00
CentOS7 Vagrantfile with access to guest port (apache) and Windows shared folder (/vagrant_dropbox)
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below.
Vagrant.configure("2") do |config|
# Every Vagrant development environment requires a box. You can search for
# boxes at https://atlas.hashicorp.com/search.
config.vm.box = "centos/7"
@jakebrinkmann
jakebrinkmann / setup-dd-wrt-router.md
Last active December 7, 2016 03:21
Setup my wireless router (Linksys WRT54GL) at home (with DD-WRT firmware)
  1. To do a 30-30-30 reset you must push the reset button with your router powered on. Hold it for 30 seconds with the router powered on. STILL holding it, pull the power cord for 30 seconds. Still holding it, plug the power back into your router and continue to hold the reset button for 30 more seconds. You will have held the button for a full 90 seconds without releasing it.
  2. Set a static IP on your computer to 192.168.1.7. Subnet mask should be 255.255.255.0.
  3. Connect the lan cable from your computer to a LAN port of your router. Make sure your router is plugged in. Nothing should be connected to your computer or the router except the lan cable between them. Turn your firewall and any wireless computer connections OFF.
  4. Power cycle the router (uplug the power from the router for 30 seconds and then plug it back in)
  5. Open your browser to 192.168.1.1 by putting that in the browser address window of your browser. You should open the dd-wrt webgui
  6. Leave the username blank and enter "admin" as the pa
@jakebrinkmann
jakebrinkmann / CHANGELOG.md
Last active June 14, 2021 17:19
Git Development Workflow (Github, Gitlab)
@jakebrinkmann
jakebrinkmann / run-jupyter-custom.bat
Created December 9, 2016 17:58
Custom jupyter notebook launch script
@ECHO OFF
cd C:\workspace\
set path=C:\Users\jbrinkmann\AppData\Local\Continuum\Anaconda2;C:\Users\jbrinkmann\AppData\Local\Continuum\Anaconda2\Scripts;%PATH%
start "IPython Notebook" "C:\Users\jbrinkmann\AppData\Local\Continuum\Anaconda2\Scripts\jupyter-notebook.exe"
REM %USERPROFILE%\AppData\Local\Continuum\Anaconda2\Menu\jupyter.ico
@jakebrinkmann
jakebrinkmann / create-master-git.sh
Last active December 13, 2016 16:36
Set git to push to two repositories
# Make a boneyard for projects
mkdir /d/workspace/user.git
# For a new project, first make a repo to push to
git init --bare /d/workspace/user.git/project-api.git
# Connect the project to the blank repo
cd /d/workspace/project-api/
git remote add user /d/workspace/user.git/project-api.git
git remote add mygithub https://github.com/user/project-api.git
@jakebrinkmann
jakebrinkmann / get-x11-working-on-windows.md
Last active April 3, 2025 18:15
Get x11 forwarding setup in windows (I'm using git-bash) (should be similar for cygwin) (do not use putty)
  • Install Xming: http://sourceforge.net/projects/xming/
  • Set your path variable: export PATH=$PATH:/c/Users/myself/AppData/Local/Xming/
  • [always?]: Run XLaunch and select the display setting you want to use
  • Export DISPLAY variable: export DISPLAY=localhost:0
  • ssh with the x11 forwarding enabled: ssh -XY me@myhost
  • Try it out: nautilus
@jakebrinkmann
jakebrinkmann / config
Last active September 4, 2020 00:18
How to setup passwordless ssh
# ~/.ssh/config
Host *
# Send a sign-of-life signal every 4 minutes
TCPKeepAlive yes
ServerAliveCountMax 3
ServerAliveInterval 240
# Can speed up logins to some servers
GSSAPIAuthentication no
GSSAPIKeyExchange no
@jakebrinkmann
jakebrinkmann / install-jupyter-notebook-conda.sh
Last active May 4, 2018 15:50
install-jupyter-notebook-conda
# To create an environment from a specific python version
conda create -n <env-name> python=2.7.13
# [OPTIONAL] conda config --add channels conda-forge
# To allow Jupyter to find conda env `Python [conda env: root]`, etc.
source activate <env-name>
conda install jupyter ipykernel nb_conda --yes
source deactivate
@jakebrinkmann
jakebrinkmann / custom-python-path.sh
Created February 17, 2017 15:36
Use the same commands in python over and over? Make it an easy import
# Setup python to look to /path/2/my/scripts (append it to python path)
CUSTOMDIR=/path/2/my/scripts
PYTHONSITEDIR=$(python -c 'import site; site._script()' --user-site)
mkdir -vp $PYTHONSITEDIR
echo $CUSTOMDIR > $PYTHONSITEDIR/custom.pth
# Now, create a script
tee $CUSTOMDIR/my_script.py <<EOF
import os
os.environ['SET_THIS'] = '/path/to/data'