(setq org-confirm-babel-evaluate nil)
(setq org-babel-sh-command "ssh default ")
;; customize the following variables:
;;(setq org-babel-load-languages
;;<<< '((emacs-lisp . t) (python . t) (clojure . t) (sh . t ) (perl . t)))
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
[klang@ergates bin]$ split_destination-test.sh | |
destination [email protected]:/full/path/to/install/package.ext | |
server host.with.full.domain | |
servershort host | |
user user | |
fullpath /full/path/to/install/package.ext | |
path /full/path/to/install/ | |
package package.ext |
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 monitor | |
(:gen-class) | |
(:import (java.io RandomAccessFile))) | |
(def sleep-interval 2000) | |
(defn extract-ip-address [message] | |
(if (not (nil? message)) | |
(let [pattern "(\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}) ([0-9a-f]+\\.[0-9a-f]+\\.[0-9a-f]+) via (\\d{1,3}\\.\\d{1,3}\\.\\d{1,3}\\.\\d{1,3})" | |
message-seq (first (re-seq (re-pattern pattern) message)) |
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
We have the situation, where a cvs server is not available from a development host, but the development host | |
is available from the cvs server: | |
.-----. | |
| PC | | |
.-----. | |
/ \ | |
v v | |
.-----. .-----. | |
| cvs |------>| dev | |
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
import org.apache.commons.codec.digest.DigestUtils; | |
public class GitSha1 { | |
public static String githash(String aString){ | |
return DigestUtils.sha1Hex("blob " + aString.length() + "\0" + aString); | |
} | |
public static void main(String[] args) { |
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
{ | |
"AWSTemplateFormatVersion": "2010-09-09", | |
"Description": "Building a VPC from scratch with CloudFormation", | |
"Mappings": { | |
"SubnetConfig": { | |
"VPC": { "CIDR": "10.0.0.0/16" }, | |
"Public": { "CIDR": "10.0.0.0/24" } | |
}, | |
"RegionMap" : { |
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
# array | |
>>> [1] | |
[1] | |
>>> [1,] | |
[1] | |
# hash | |
>>> {'a':1} | |
{'a': 1} | |
>>> {'a':1,} |
Download and install the docx2txt converter from http://docx2txt.sourceforge.net/
wget -O doc2txt.tar.gz http://docx2txt.cvs.sourceforge.net/viewvc/docx2txt/?view=tar
tar zxf docx2txt.tar.gz
cd docx2txt/docx2txt/
sudo make
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/sh | |
# blog post: http://www.sitepoint.com/one-click-app-deployment-server-side-git-hooks/ | |
## store the arguments given to the script | |
read oldrev newrev refname | |
## Where to store the log information about the updates | |
LOGFILE=./post-receive.log | |
# The deployed directory (the running site) | |
DEPLOYDIR=/var/www/html/simpleapp |
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/sh | |
# a quick & dirty script to create a TinyCore initrd (for Core >= 4.2) | |
H=$( pwd ) | |
M=$( mount | grep iso9660 | head -1 | awk '{print $3}' ) | |
[ -z "$M" ] && echo "can not find mounted CD-ROM" && exit 1 | |
D=$( mktemp -d ) |