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
SSH_AGENT_FILE=`echo ~/.ssh-agent-$(hostname)` | |
source ${SSH_AGENT_FILE} &> /dev/null | |
alias ssh-add='if ! kill -0 "$SSH_AGENT_PID" 2>/dev/null; then ssh-agent > "$SSH_AGENT_FILE"; source "$SSH_AGENT_FILE"; fi; ssh-add' | |
alias ui='cd /cygdrive/d/Code/yoga/web' | |
alias web='cd /cygdrive/d/Code/github/lauriro.github.com' | |
alias runphp='/usr/local/php-5.3.1/php-cgi.exe -b 127.0.0.1:9000 &' | |
alias runwww='kill `cat /var/run/lighttpd.pid` 2>/dev/null; /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf' |
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/sh | |
if [ ! -f "$2" -o ! -f "$5" ] ; then | |
echo "One side missing: $2 vs. $5" | |
exit 0 | |
fi | |
if which cygpath &> /dev/null; then | |
path="$(cygpath $1)" |
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/sh | |
localPath="$(cygpath --mixed --absolute "$2")" | |
basePath="$(cygpath --mixed --absolute "$1")" | |
remotePath="$(cygpath --mixed --absolute "$3")" | |
resultPath="$(cygpath --mixed --absolute "$4")" | |
if [ ! -f $basePath ] | |
then | |
basePath="$(cygpath --mixed --absolute ~/diffmerge-empty)" |
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
# | |
# Makefile for Project | |
# | |
# | |
# Tags: | |
# ===== | |
# | |
# Certain tags are used in comments to assist in indexing common issues: | |
# - TODO to indicate planned enhancements. | |
# - FIXME to mark potential problematic code that requires special |
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
http://github.com/medined/smime | |
Secure Exchange Solutions | |
SES Client | |
The tool it is mostly about an AS1 implementation (www.ietf.org, look for | |
"MIME-based secure EDI"). The end-user tool should be able to download from | |
an Internet site (there is a specific WSDL, authentication mechanism and file | |
format) a directory of contacts (name and e-mail plus the public encryption |
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/sh | |
# openssl rsa -in ~/.ssh/id_rsa -pubout -out ~/.ssh/id_rsa.pub.pem | |
# ln -s ~/rsacrypt.sh /usr/bin/rsacrypt | |
ENCRYPTED="" | |
DECRYPTED="" | |
usage() { | |
echo -e "\nUsage: $0 [-e [PUBLIC_KEY]] [-d [PRIVATE_KEY]]" | |
exit 1 |
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
Lauri@Lauri-PC ~/.ssh (acer *) | |
$ echo "123" | openssl rsautl -inkey ~/.ssh/id_rsa.pub.pem -pubin -encrypt | openssl base64 | |
GC5YemYYXLkkd8FulzLvJyKrtnqtxP0FuZ27qhDMgA1i38pi4Lgs/xFLwOYa1Hcu | |
TDuVETicqnBRCg0erBqmJwnCLe8qLvOio+MpnUO01LZzMC8XM0X7A6iSL4TtEUqw | |
fzD+ZqpHhGHlZHNhQ3U8nl2ZpiFTPr5ho9FRG8f6e9mJrI0n4xnNB3xKj9S9k00P | |
Njqn753WNRE5KC+8vwo8zrjgmB3is1Q0kIdmlTGzJfq8N08MQDJT1gAV/hsbCjvV | |
dqd7QNvInrq3qCA5H0aHhFV+EhXU8OxSKPYVnhslm6j6KDjZij0Idv7vEuDIlJsK | |
MngVoDaSpjy7abfyLTvA+NAqIMGAr98Tp3ik+2xAcyKpM/b4SVWvWEJalVXbV72S | |
8HK2FVK2IlaULto0qpGHOl/QqPzLuIpmVB3zzU8VyPBAUWuvuJUpoFGIvslItrTe | |
vyHs93c3qmcEgNHJQPPTufHp1/JYtZ00odGGDRCcbU34Fg782hXMKqRuCmOGrjEQ |
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
export PS1='\n\[\e[32m\]\t \u@\h \[\e[33m\w$(__git_ps1)\e[0m\]\n\$ ' | |
ps1_time() { | |
local s=1 c IFS=$'\n' | |
for c in $BASH_COMMAND; do s=$((${#c}/$COLUMNS+1+$s)); done | |
printf "\033[s\033[${s}A\033[32m%s\033[0m\033[u" $(date +%H:%M:%S); | |
} | |
export PROMPT_COMMAND="trap 'ps1_time; trap DEBUG' DEBUG" |
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
# Add to .bashrc or .zshrc and try it out | |
# $ sleep 5 | |
# -- Runs 5 seconds | |
time_to_words() { | |
local mod num="$1" out="" | |
set -- 60 second 60 minute 24 hour 7 day 4 week 12 month | |
while test $num -gt 0; do | |
mod=`expr $num % $1` |
OlderNewer