Skip to content

Instantly share code, notes, and snippets.

View bjcubsfan's full-sized avatar
👋

B. J. Potter bjcubsfan

👋
View GitHub Profile
@bjcubsfan
bjcubsfan / list_loop_over_copy.py
Created December 27, 2011 21:02
How to list over a copy of a loop
!/usr/bin/env python
import pdb
expected_rngs = range(0,10)
file_list = [0, 1, 2, 3, 4, 5, 6, 8, 9]
for antenna in expected_rngs[:]:
print "*********************************************************************"
print "CHECKING", antenna
for rng in file_list:
@bjcubsfan
bjcubsfan / list_loop_delete.py
Created December 27, 2011 21:05
looping over and deleting items in a list (bad things happen)
#!/usr/bin/env python
import pdb
expected_rngs = range(0,10)
file_list = [1, 2, 3, 4, 5, 6, 8, 9]
for antenna in expected_rngs:
print "*********************************************************************"
print "Checking", antenna
for rng in file_list:
@bjcubsfan
bjcubsfan / add_users_to_projects.sh
Created March 9, 2012 16:35 — forked from lanwin/add_users_to_projects.sh
Script to Automatically add all GitLab users to all projects
#!/bin/sh
baseurl=http://mygitlaburl
usermail=adminuser@mymailserver
userpass=adminpassword
repo_access=2 #0=denied 1=read 2=read&write
project_access=2 #0=deined 1=read 2=report 3=admin
# login
curl -s -I -c cookies.txt -d "utf8=✓&user[email]=$usermail&user[password]=$userpass&commit=Sign+in" $baseurl/users/sign_in
@bjcubsfan
bjcubsfan / mirrorlist
Created May 9, 2012 15:54
Arch mirror list for AMC-189
# Arch Linux mirrorlist generated by Reflector
# With: /usr/bin/reflector -c '%own$' -f 6
# When: 2012-05-02 22:30:03 UTC
# From: https://www.archlinux.org/mirrors/status/json/
# Retrieved: 2012-05-02 22:28:13 UTC
# Last Check: 2012-05-02T21:35:28.027Z UTC
Server = http://cosmos.cites.illinois.edu/pub/archlinux/$repo/os/$arch
Server = http://mirror.mocker.org/archlinux/$repo/os/$arch
Server = http://mirrors.gigenet.com/archlinux/$repo/os/$arch
@bjcubsfan
bjcubsfan / dd_xvi_edit.txt
Created June 29, 2012 14:51
Text cut from 2012-06-29 BS Draft Diary XVI
7:44 — Actual transcript of the MKG/Mark Jones interview … .
Jones: "Michael, what does it mean to be drafted no. 2 overall and go down to play for Michael Jordan in Charlotte?"
MKG [overcome]: "Oh man, it's just a blessing for me, Anthony Davis would be here … So … oh my God … "
Me: "Nobody should ever be this excited to play with DJ Augustin and Bismack Biyombo."
Jones: "And to play for the University of Kentucky and to see what your school has done with the first two picks in this draft … "
@bjcubsfan
bjcubsfan / gist:4739391
Created February 8, 2013 14:37
Arch Boot Failure Not in journalctl
Feb 07 15:50:55 lore systemd[1]: Stopped Remount Root and Kernel File Systems.
Feb 07 15:50:55 lore systemd[1]: Starting Save Random Seed...
Feb 07 15:50:55 lore systemd[1]: Starting Update UTMP about System Shutdown...
Feb 07 15:50:55 lore systemd[1]: Starting Shutdown.
Feb 07 15:50:55 lore systemd[1]: Reached target Shutdown.
Feb 07 15:50:55 lore systemd[1]: Started Save Random Seed.
Feb 07 15:50:55 lore systemd[1]: Started Update UTMP about System Shutdown.
Feb 07 15:50:55 lore systemd[1]: Starting Final Step.
Feb 07 15:50:55 lore systemd[1]: Reached target Final Step.
Feb 07 15:50:55 lore systemd[1]: Starting Reboot...
@bjcubsfan
bjcubsfan / arch_upgraded_packages.txt
Created February 9, 2013 00:01
Arch Packages on upgrade that broke my machine.
==> Package upgrade only (new release):
core/acl 2.2.51-2 2 -> 3
core/glibc 2.17-1 1 -> 3
core/gcc-libs 4.7.2-3 3 -> 4
core/binutils 2.23.1-2 2 -> 3
core/findutils 4.4.2-4 4 -> 5
core/sed 4.2.2-1 1 -> 2
core/krb5 1.11-1 1 -> 2
core/cronie 1.4.9-1 1 -> 2
core/file 5.11-1 1 -> 2
@bjcubsfan
bjcubsfan / gist:4773854
Created February 12, 2013 22:02
Message about zmq and simplejson
bpotter@hal9000➜~mmccoombe/20121219 ESS Antenna Position Update/RNG» gpsdate --ig 1719d3 -f
Install zmq and simplejson to use the LiveFeedSubscription().
WAAS datetime : 2012-12-19 00:00:00
UTC datetime : 2012-12-18 23:59:44
Local datetime: 2012-12-18 23:59:44
WAAS seconds : 1039910400.0
GPS Weekday : 1719d3
GPS Wk Seconds: 695 259200.0
sec mod 1024 : 420595200.0
sec since day : 0.0
@bjcubsfan
bjcubsfan / common
Last active December 14, 2015 02:58
common keymap that fixes rdesktop-wiggle
include modifiers
#
# Top row
#
1 0x2
2 0x3
3 0x4
4 0x5
5 0x6
{'site': 'zse'
'wre': 'b'
'waas_second': 1046639304.0
'header': {'current_wre_mode': 5,
'discarded_logs': 0,
'gps_crc': 2548719432,
'lru_status_flag': 0,
'number_of_geo_obs': 3,
'number_of_gps_obs': 11,
'rate_group_type': 2,