keybase pgp pull <keybase.io user>
gpg --edit-key <keybase.io user>
> lsign
> save
git-crypt add-gpg-user <keybase.io user>
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[alias] | |
rebase-branch = !git rebase -i --autosquash $(git merge-base --fork-point origin/master HEAD) |
This simple script will take a picture of a whiteboard and use parts of the ImageMagick library with sane defaults to clean it up tremendously.
The script is here:
#!/bin/bash
convert "$1" -morphology Convolve DoG:15,100,0 -negate -normalize -blur 0x1 -channel RBG -level 60%,91%,0.1 "$2"
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns react-cljs.core | |
(:require React)) | |
(declare render) | |
(defn handle-change [e] | |
(render {:text (.. e -target -value)})) | |
(defn render [{:keys [text]}] | |
(React/renderComponent |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Tested with LiveReload 2.3.18 | |
The only requirement is that the updating requests are sent with ?livereload={etc} in the url. | |
LiveReload should be configured to NOT compile the assets, as we want webassets to take care of this. We're | |
just using LR for the notification/loading parts. |
Locate the section for your github remote in the .git/config
file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/*
to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import grequests | |
from collections import deque | |
class RequestQueue(object): | |
""" | |
This is a lame imitation of a Typhoeus Hydra using GRequests. | |
The main thing this allows is building up a queue of requests and then | |
executing them, and potentially adding requests to the queue in a callback | |
so that you can build requests that depend on other requests more naturally. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# source: http://st-on-it.blogspot.com/2010/01/how-to-move-folders-between-git.html | |
# First of all you need to have a clean clone of the source repository so we didn't screw the things up. | |
git clone git://server.com/my-repo1.git | |
# After that you need to do some preparations on the source repository, nuking all the entries except the folder you need to move. Use the following command | |
git filter-branch --subdirectory-filter your_dir -- -- all | |
# This will nuke all the other entries and their history, creating a clean git repository that contains only data and history from the directory you need. If you need to move several folders, you have to collect them in a single directory using the git mv command. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get update | |
apt-get install pptpd -y | |
echo localip 192.168.240.1 >> /etc/pptpd.conf | |
echo remoteip 192.168.240.2-9 >> /etc/pptpd.conf | |
echo ms-dns 8.8.8.8 >> /etc/ppp/pptpd-options | |
echo ms-dns 8.8.4.4 >> /etc/ppp/pptpd-options | |
echo "vpn pptpd pass123 *" | tee -a /etc/ppp/chap-secrets | |
/etc/init.d/pptpd restart |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(ns tiexample.core) | |
(defn ^{:export dbg} dbg [s] | |
(js* "Titanium.API.debug(~{s})")) | |
;;stolen from another gist I saw | |
(defn make-js-map | |
"makes a javascript map from a clojure one" | |
[cljmap] | |
(let [out (js-obj)] |
NewerOlder