Skip to content

Instantly share code, notes, and snippets.

View connectthefuture's full-sized avatar

justthefracts connectthefuture

  • Midwest usa
View GitHub Profile
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@connectthefuture
connectthefuture / vimgolf.vimrc
Created October 12, 2017 02:24 — forked from igrigorik/vimgolf.vimrc
Basic vimrc to level the playing field...
" http://vimdoc.sourceforge.net/htmldoc/starting.html#vimrc
set nocompatible " use vim defaults
set scrolloff=3 " keep 3 lines when scrolling
set ai " set auto-indenting on for programming
set showcmd " display incomplete commands
set nobackup " do not keep a backup file
set number " show line numbers
set ruler " show the current row and column
#!/usr/bin/env bash
# ~/.macos — https://mths.be/macos
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.macos` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@connectthefuture
connectthefuture / .osx
Created August 6, 2017 08:12 — forked from chaseconey/.osx
OSX Setup Script
#!/usr/bin/env bash
# ~/.osx — https://mths.be/osx
# Ask for the administrator password upfront
sudo -v
# Keep-alive: update existing `sudo` time stamp until `.osx` has finished
while true; do sudo -n true; sleep 60; kill -0 "$$" || exit; done 2>/dev/null &
@connectthefuture
connectthefuture / gist:759b51be78a3fb29f4031fe79e397f6e
Created July 27, 2017 20:40 — forked from nathanmarz/gist:1165885
Benchmark between HashMap with lock vs. persistent map with atom
(defn map-incr-unsafe []
(let [m (java.util.HashMap.)]
(.put m "a" 0)
(doseq [i (range 1000000)]
(let [a (.get m "a")]
(.put m "a" (inc a))
))))
(defn map-incr-safe []
(let [o (Object.)
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Ansi 0 Color</key>
<dict>
<key>Color Space</key>
<string>sRGB</string>
<key>Blue Component</key>
<real>0.25882352941176473</real>
@connectthefuture
connectthefuture / dockerclouds.md
Created February 20, 2017 14:49
Docker methods

bash eval "$(docker-machine env default)"

@connectthefuture
connectthefuture / BASHFISH.MD
Created February 20, 2017 14:40
BASH TO FISH
@connectthefuture
connectthefuture / t.py
Created September 12, 2016 21:58 — forked from kennethreitz/t.py
def dictify(s):
items = s.split()
for i, item in enumerate(items):
if ':' in item:
items[i] = item.split(':')
else:
items[i] = (item, True)
print dict(items)