Skip to content

Instantly share code, notes, and snippets.

View execjosh's full-sized avatar
🤔
🤔

execjosh execjosh

🤔
🤔
View GitHub Profile
@execjosh
execjosh / net-textproto-ignore-050.patch
Created December 7, 2020 13:31
A ~hack~ patch to teach net/textproto how to ignore `050`
diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go
index a00fd2395f..9f82186c62 100644
--- a/src/net/textproto/reader.go
+++ b/src/net/textproto/reader.go
@@ -10,6 +10,7 @@ import (
"fmt"
"io"
"io/ioutil"
+ "log"
"strconv"
@execjosh
execjosh / install-tools
Last active January 23, 2022 08:22
A better way to install Go tool dependencies
#!/bin/bash
# Assuming ./tools/tools.go, the following will give you a list of your tools:
#
# go list -f '{{ join .Imports "\n" }}' -tags tools ./tools
#
# No need for the likes of grep, awk, sed, cut, etc.
while read -r i; do
echo "## go install ${i}"
@execjosh
execjosh / SwiftyJSONExtensions.swift
Created March 6, 2018 06:20
Compatiblility shim for updating to SwiftyJSON v4.0.0
import SwiftyJSON
public extension JSON {
// Compatiblility shim for updating to SwiftyJSON v4.0.0
// See changes introduced by: https://github.com/SwiftyJSON/SwiftyJSON/pull/833
init(data: Data) {
do {
try self.init(data: data, options: [])
} catch {
self.init(jsonObject: NSNull())
@execjosh
execjosh / atom-v0.75.0-confirm-quit.patch
Last active January 12, 2016 23:33
Confirm Quit for Atom v0.75.0
--- a/Atom.app/Contents/Resources/app/src/workspace-view.js
+++ b/Atom.app/Contents/Resources/app/src/workspace-view.js
@@ -153,7 +153,37 @@
this.command('application:show-settings', function() {
return ipc.sendChannel('command', 'application:show-settings');
});
+ var quitDoubleTapTimeout = null
+ function showConfirmQuitMsg() {
+ $('<div>')
+ .attr({
@execjosh
execjosh / atom-0.75.0-block-cursor.patch
Last active November 2, 2019 18:59
Block Cursor for Atom v0.75.0
--- a/Atom.app/Contents/Resources/app/src/cursor-view.js
+++ b/Atom.app/Contents/Resources/app/src/cursor-view.js
@@ -19,7 +19,12 @@
"class": 'cursor idle'
}, (function(_this) {
return function() {
- return _this.raw('&nbsp;');
+ return _this.div({
+ outlet: 'cursorValue',
+ 'style': 'visibility:hidden;'
@execjosh
execjosh / issue-206.html
Created August 28, 2011 14:57
Simple test file for phantomjs issue 206
<!doctype html>
<script>
function isObject(o) {
return typeof o === 'object';
}
function isFunction(o) {
return typeof o === 'function';
}