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
You can get help for a command by typing | |
C-h f function-name | |
This will usually tell you if it has a standard key binding. Conversely, given a key sequence, you can type | |
C-h k key-sequence | |
To get the command that would run. For more help on getting help, you can type |
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
Active undoo-tree with C-x u | |
Move up,down,left, and right the tree with up/down/left/right arrow | |
In the tree window you can enable timestamps and diffs with t and d | |
;; t (`undo-tree-visualizer-toggle-timestamps') | |
;; Toggle display of time-stamps. | |
;; | |
;; d (`undo-tree-visualizer-toggle-diff') |
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
(use 'ring.adapter.jetty) | |
(defn app-handler [request] | |
{:status 200 | |
:headers {"Content-Type" "text/html"} | |
:body (str request)}) | |
(defonce server (run-jetty #'app-handler {:port 3000 :join? false})) | |
(.start server) |
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 | |
DAYS_AGO=$1 | |
TARGET_INDEX=logstash-`date --date="$DAYS_AGO days ago" +%Y.%m.%d`; | |
if [[ "$DAYS_AGO" ]]; then | |
# echo "computed target index: $TARGET_INDEX" | |
curl -XDELETE "http://localhost:9200/$TARGET_INDEX" | |
else |
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
$ docker history imagename | |
IMAGE CREATED CREATED BY SIZE | |
f770fc671f11 12 seconds ago apt-get install -y curl 21.3 MB | |
28445c70c2b3 39 seconds ago apt-get install ping 11.57 MB | |
8dbd9e392a96 7 months ago 131.5 MB | |
$ docker tag 2844 imagename # <-- that's the secret right there | |
$ docker history imagename | |
IMAGE CREATED CREATED BY SIZE |
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
brew install -v emacs --HEAD --use-git-head --with-cocoa --srgb |
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
1. Download the SQLite source amalgamation from | |
http://sqlite.org/download.html | |
2. unpack the source in a directory of your choice (e.g. C:\sqlite3) | |
3. be sure to have the Ruby DevKit installed and enabled the DevKit | |
environment | |
4. compile the DLL, I used following command: | |
gcc -Os -O2 -DSQLITE_ENABLE_FTS4 -DSQLITE_ENABLE_RTREE | |
-DSQLITE_ENABLE_COLUMN_METADATA --shared sqlite3.c -o sqlite3.dll |
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
#!/opt/local/bin/perl -w | |
use threads; | |
use strict; | |
use warnings; | |
# SOURCE REF: http://chicken.genouest.org/perl/multi-threading-with-perl/ | |
my @a = (); | |
my @b = (); |
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 | |
FILE=$1 | |
################################################################################## | |
function usage(){ | |
echo "usage: $(basename $0) /path/to/java-rpm-file.rpm" | |
} | |
################################################################################## |
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
# installation via rpm | |
jdk-8u60-linux-x64.rpm | |
rpm -Uvh jdk-8u60-linux-x64.rpm | |
alternatives --config java | |
alternatives --config javaws | |
alternatives --config libjavaplugin.so | |
alternatives --config libjavaplugin.so.x86_64 |