This file contains hidden or 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 | |
# adds a file to all commits in a git repository, as if it had always been there | |
# first arg is the path to the file to add | |
# second arg is relative path within the repository where the file should go | |
# this is much faster than `git filter-branch --tree-filter 'cp /path/to/file repo/path && git add repo/path' -- --all | |
cat $1 > /tmp/file-to-add | |
git filter-branch --index-filter "cat /tmp/file-to-add | git hash-object -w --stdin | xargs -L 1 -I X git update-index --add --cacheinfo 100644 X $2" --tag-name-filter cat -- --all |
This file contains hidden or 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
diff --git pommed/dbus.h pommed/dbus.h | |
index d6c42a9..597dd1f 100644 | |
--- pommed/dbus.h | |
+++ pommed/dbus.h | |
@@ -5,7 +5,7 @@ | |
#ifndef __MBPDBUS_H__ | |
#define __MBPDBUS_H__ | |
-#define DBUS_TIMEOUT 200 | |
+#define DBUS_TIMEOUT 1500 |
This file contains hidden or 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 jquerytest.core) | |
(def jquery (js* "$")) | |
(jquery | |
(fn [] | |
(-> (jquery "div.meat") | |
(.html "This is a test.") | |
(.append "<div>Look here!</div>")))) |
This file contains hidden or 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
(defun post-buffer (arg) | |
(interactive "P") | |
(let ((url (if (or arg (not last-http-post-url)) | |
(read-from-minibuffer "URL:" last-http-post-url) | |
last-http-post-url))) | |
(setq last-http-post-url url) | |
(http-post-body url (buffer-string) "text/plaintext" 'utf-8))) |