Skip to content

Instantly share code, notes, and snippets.

@YesThatAllen
YesThatAllen / git-recover-branch.md
Created December 16, 2016 02:11 — forked from jbgo/git-recover-branch.md
How to recover a git branch you accidentally deleted

UPDATE: A better way! (August 2015)

As pointed out by @johntyree in the comments, using git reflog is easier and more reliable. Thanks for the suggestion!

 $ git reflog
1ed7510 HEAD@{1}: checkout: moving from develop to 1ed7510
3970d09 HEAD@{2}: checkout: moving from b-fix-build to develop
1ed7510 HEAD@{3}: commit: got everything working the way I want
70b3696 HEAD@{4}: commit: upgrade rails, do some refactoring
@YesThatAllen
YesThatAllen / autodmg.log
Created October 16, 2016 18:27
AutoDMG Debug log with kernel's disk i/o errors added inline
2016-10-16 11:52:42 Info: AutoDMG v1.6 build 452
2016-10-16 11:52:42 Info: Mac OS X 10.12 16A323
2016-10-16 11:52:42 Info: CPython 2.7.10 (GCC 4.2.1 Compatible Apple LLVM 8.0.0 (clang-800.0.34))
2016-10-16 11:52:42 Info: PyObjC 2.5.1
2016-10-16 11:52:42 Info: Loading update profiles with PublicationDate 2016-10-15 15:21:22 +0000
2016-10-16 11:52:42 Debug: (IEDUpdateController:185) profilesUpdated
2016-10-16 11:52:42 Info: Pruning cache
2016-10-16 11:52:42 Info: Found iTunes12.5.1(c94f238).dmg -> c94f2386e780fdef391d2636c9bd7b692f9ceeca
2016-10-16 11:52:42 Debug: (IEDController:46) awakeFromNib
2016-10-16 11:52:42 Debug: (IEDSocketListener:34) Creating socket at /tmp/se.gu.it.IEDSocketListener.6058c1072d10632d
# ************************************************************
# Sequel Pro SQL dump
# Version 4096
#
# http://www.sequelpro.com/
#
# ************************************************************
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
@YesThatAllen
YesThatAllen / gist:fde1a2cef616a8741bdc
Created December 2, 2014 06:06
nsurlstoraged errors
12/1/14 11:06:12.402 PM nsurlstoraged[320]: realpath() returned NULL for /var/root/Library/Caches/jamf
12/1/14 11:06:12.402 PM nsurlstoraged[320]: The read-connection to the DB=/var/root/Library/Caches/jamf/Cache.db is NOT valid. Unable to determine schema version.
12/1/14 11:06:12.403 PM nsurlstoraged[320]: realpath() returned NULL for /var/root/Library/Caches/jamf
12/1/14 11:06:12.403 PM nsurlstoraged[320]: realpath() returned NULL for /var/root/Library/Caches/jamf
12/1/14 11:06:12.403 PM nsurlstoraged[320]: ERROR: unable to determine file-system usage for FS-backed cache at /var/root/Library/Caches/jamf/fsCachedData. Errno=13
12/1/14 11:24:07.714 PM nsurlstoraged[320]: realpath() returned NULL for /var/root/Library/Caches/jamf
12/1/14 11:24:07.714 PM nsurlstoraged[320]: The read-connection to the DB=/var/root/Library/Caches/jamf/Cache.db is NOT valid. Unable to determine schema version.
12/1/14 11:24:07.714 PM nsurlstoraged[320]: realpath() returned NULL for /var/root/Library/Caches/jamf
12/1/14 11:24:07
@YesThatAllen
YesThatAllen / custom.css
Created October 18, 2014 06:34
discourse CSS
html .social {
text-align: center;
}
a {
border-bottom: 1px dotted gray;
}
a.star {
border-bottom: none;
@YesThatAllen
YesThatAllen / gist:674ef18167494d991597
Created September 29, 2014 02:10
Liteswitch looping logs
9/28/14 9:09:09.887 PM NotificationCenter[1037]: Dock connection interrupted!
9/28/14 9:09:09.887 PM NotificationCenter[1037]: disconnect 0x60800010f150
9/28/14 9:09:09.888 PM NotificationCenter[1037]: Dock connection invalid!
9/28/14 9:09:09.888 PM NotificationCenter[1037]: disconnect 0x0
9/28/14 9:09:09.900 PM com.apple.xpc.launchd[1]: (com.apple.Dock.agent[58574]) Service exited with abnormal code: 1
9/28/14 9:09:09.987 PM WindowServer[216]: Surface testing disallowed updates for 10 sequential attempts...
9/28/14 9:09:09.996 PM WindowServer[216]: Surface test allowed updates after 11 attempts
9/28/14 9:09:10.000 PM kernel[0]: Sandbox: storeuid(1803) deny mach-lookup com.apple.dock.server
9/28/14 9:09:10.000 PM kernel[0]: Sandbox: storeuid(1803) deny mach-lookup com.apple.dock.server
9/28/14 9:09:10.673 PM com.apple.xpc.launchd[1]: (com.apple.imfoundation.IMRemoteURLConnectionAgent) The _DirtyJetsamMemoryLimit key is not available on this platform.
Instructions for clearing expired DigiCert SSL certificate on OSX
NOTICE: The following instructions “worked for me.” Proceed at your own risk.
Symptoms:
* Visiting several sites, such as github, gravatar, twitter’s CDN results in “invalid certificate” errors
* For example: http://i.imgur.com/8gPRfI3.png
## Instructions
@YesThatAllen
YesThatAllen / postflight-add-on.py
Last active June 15, 2017 17:44
Disabling a Watchman Monitoring plugin before first run
#To disable a specific plugin
# Don't.. you probably would rather have the plugin ignored on the server side, so that the data can still be gathered.
@YesThatAllen
YesThatAllen / wm.sh
Last active August 29, 2015 14:02
How to install the Watchman Monitoring agent in four lines
/usr/bin/defaults write /Library/MonitoringClient/ClientSettings ClientGroup -string "Insert_ClientGroup_variable_here" && \
/usr/bin/curl -L --sslv3 https://{subdomain}.monitoringclient.com/downloads/MonitoringClient.pkg > /tmp/MonitoringClient.pkg && \
/usr/sbin/installer -target / -pkg /tmp/MonitoringClient.pkg
/bin/rm /tmp/MonitoringClient.pkg
tester105-vm (172.16.46.105)
total 8
drwxr-xr-x 5 root wheel 170 Dec 28 07:24 .
drwxr-xr-x 6 root wheel 204 Dec 28 07:24 ..
drwxr-xr-x 8 root wheel 272 Dec 28 11:46 2.3
drwxr-xr-x 11 root wheel 374 Dec 28 12:48 2.5
lrwxr-xr-x 1 root wheel 3 Dec 28 07:24 Current -> 2.5