Skip to content

Instantly share code, notes, and snippets.

@rentzsch
rentzsch / setup github issues labels.sh
Last active July 1, 2021 22:10
Shell script to set up a GitHub Project's Issues' Labels as described in <http://rentzsch.tumblr.com/post/252878320/my-lighthouse-ticket-settings-with-colors>. WARNING: script assumes a newish project that hasn't really used labels yet. It deletes all default labels, which means DATA LOSS if you've used them for anything.
USER=rentzsch
PASS=mypassword
REPO=mogenerator
# Delete default labels
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/bug"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/duplicate"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/enhancement"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/invalid"
curl --user "$USER:$PASS" --include --request DELETE "https://api.github.com/repos/$USER/$REPO/labels/question"
@rentzsch
rentzsch / gist:4504587
Created January 10, 2013 18:35
[PATCH] CVE-2013-0156 for Rails 2.3.15. Extracted into a directly-linkable Gist from <https://groups.google.com/forum/?fromgroups=#!topic/rubyonrails-security/61bkgvnSGTQ>
From 70adb9613e4a40c5645c99da374639c41012e4fc Mon Sep 17 00:00:00 2001
From: Jeremy Kemper <jeremy@bitsweat.net>
Date: Sat, 5 Jan 2013 17:46:26 -0700
Subject: [PATCH] CVE-2013-0156: Safe XML params parsing. Doesn't allow
symbols or yaml.
---
actionpack/test/controller/webservice_test.rb | 13 ++++++++
activesupport/CHANGELOG | 6 ++++
.../active_support/core_ext/hash/conversions.rb | 31 +++++++++++++++-----
@rentzsch
rentzsch / gist:4504549
Last active December 10, 2015 22:48
[PATCH] Backport Rails 2.3.15 security fix for CVE-2013-0156 to Rails 2.2.2 since we're using <https://github.com/michaeltyson/potionstore> for its PayPal Website Payments Standard support and it's behind the times. Based off <https://gist.github.com/4504587> and <http://www.insinuator.net/2013/01/rails-yaml/>
From 14eb6d9e9120f973fc78ae495bd73f7824afa6ff Mon Sep 17 00:00:00 2001
From: rentzsch <jwr.git@redshed.net>
Date: Thu, 10 Jan 2013 12:24:52 -0600
Subject: [PATCH] [FIX] Backport Rails 2.3.15 security fix for CVE-2013-0156
to Rails 2.2.2 since we're using
https://github.com/michaeltyson/potionstore for its PayPal
Website Payments Standard support and it's behind the
times.
---
@rentzsch
rentzsch / NSLocale+jr_displaysAMPM.h
Created July 21, 2012 23:54
NSLocale+jr_displaysAMPM
#import <Foundation/Foundation.h>
@interface NSLocale (jr_displaysAMPM)
+ (BOOL)jr_currentLocaleDisplaysAMPM;
- (BOOL)jr_displaysAMPM;
@end
Marker - Jul 20, 2012 9:39:13 PM
Jul 20 21:39:17 wolf-air1.local System Preferences[12466]: CFURLGetFSRef was passed this URL which has no scheme (the URL may not work with other CFURL routines): /Library/PreferencePanes/mira.prefPane/Contents/Resources/miraRCD.app
Jul 20 21:39:30 wolf-air1 com.apple.launchd.peruser.501[123] ([0x0-0xc5dc5d].com.apple.inputmethod.ironwood[12479]): Exited: Killed: 9
Jul 20 21:39:30 wolf-air1 kernel[0]: memorystatus_thread: idle exiting pid 12479 [DictationIM]
Jul 20 21:39:54 wolf-air1.local ReportCrash[12475]: Client side error: Connection interrupted
Jul 20 21:39:54 wolf-air1 kernel[0]: memorystatus_thread: idle exiting pid 12476 [coresymbolicatio]
Jul 20 21:39:54 wolf-air1 com.apple.launchd[1] (com.apple.coresymbolicationd[12476]): Exited: Killed: 9
Jul 20 21:39:58 wolf-air1 com.apple.launchd.peruser.501[123] ([0x0-0xc61c61].com.apple.inputmethod.ironwood[12489]): Exited: Killed: 9
Jul 20 21:39:58 wolf-air1 kernel[0]: memorystatus_thread: idle exiting pid 12489 [DictationIM]
wolf-air1:~ wolf$ dig edgecasesshow.com @ns1.hover.com
; <<>> DiG 9.7.3-P3 <<>> edgecasesshow.com @ns1.hover.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 916
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
wolf-air1:~ wolf$ dig edgecasesshow.com
; <<>> DiG 9.7.3-P3 <<>> edgecasesshow.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 829
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;edgecasesshow.com. IN A
wolf-air1:HelloMesmerizeXC4 wolf$ mesmerize --verbose release 1
Faraday: you may want to install system_timer for reliable timeouts
Found project "HelloMesmerizeXC4".
Looking up current release information...
Select a scheme:
1. HelloMesmerizeXC4
? 1
Building "HelloMesmerizeXC4.xcodeproj" version 1 with scheme
"HelloMesmerizeXC4"
wolf-air1:Desktop wolf$ cd HelloMesmerizeXC4
wolf-air1:HelloMesmerizeXC4 wolf$ mesmerize create HelloMesmerizeXC4
Faraday: you may want to install system_timer for reliable timeouts
Successfully created app, HelloMesmerizeXC4
wolf-air1:HelloMesmerizeXC4 wolf$ mesmerize release 1
Faraday: you may want to install system_timer for reliable timeouts
Found project "HelloMesmerizeXC4".
Looking up current release information...
Select a scheme:
1. HelloMesmerizeXC4
wolf-air1:HelloMesmerizeapp wolf$ xcodebuild -list
Information about project "HelloMesmerizeapp":
Targets:
HelloMesmerizeapp (Active)
Build Configurations:
Debug (Active)
Release
If no build configuration is specified "Release" is used.