Skip to content

Instantly share code, notes, and snippets.

Avatar
🏠
Working from home

Arda Karaduman c0ze

🏠
Working from home
  • Shibs
View GitHub Profile
View .bash_profile
export DOCKER_HOST=127.0.0.1:2375
export DISPLAY=:0 #FOR WLS Xming
export CLICOLOR=1
alias ls='ls --color=auto'
eval `dircolors /home/arda/dircolors-solarized/dircolors.256dark`
source ~/Dropbox/linux-common/.git-prompt.sh
source ~/Dropbox/linux-common/git-completion.sh
PS1="\[\e[0;32m\]\u\[\e[m\] \[\e[1;34m\]\w\[\e[m\] \[\e[1;32m\]\$\[\e[m\] \$(__git_ps1) \[\e[1;37m\]"
export PATH="$HOME/.rbenv/bin:$PATH"
View .emacs
;; Added by Package.el. This must come before configurations of
;; installed packages. Don't delete this line. If you don't want it,
;; just comment it out by adding a semicolon to the start of the line.
;; You may delete these explanatory comments.
(package-initialize)
(require 'package) ;; You might already have this line
(add-to-list 'package-archives
'("melpa" . "https://melpa.org/packages/"))
View docker_cleanup.sh
DOCKER=`which docker`
$DOCKER rm -v $($DOCKER ps -a -q -f status=exited)
$DOCKER rmi $($DOCKER images -f "dangling=true" -q)
$DOCKER volume rm $($DOCKER volume ls -qf dangling=true)
View ssh pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDj91qUnVGoIikbkS03nX87nHk59+Iuw23tSabigZIaybc3qwft9ZYSrVmuOKuR/VeBPPQDE+rgiZ26RUI37JxZNZFK0WF2hasW4f+VpksoxOHmNJ8XCrJAZGnneJAVdN7x0z4dVY5RU7+hIlO7QHaSc1eAZ1TKZAIeyDWGZt6bnbRiOEzZWVDRYFXZycmbDFwHt4y+Dp/VjyAMsur5v+L+GKLoftk/HiWAHSF5o1o6saIiwfs0GBqr6n9sBCRsBSFBgqtl833mekMfW4O1627AkpBoRzOjxAkO/7j7qLaGIiEw7EhqmDQIVgj0cqureljRMQKDoez0Rgx00yiUGlGV akaraduman@gmail.com
View insurance.sh
cat ./* | grep ALLIANZ | awk '{print $9}' | sed 's/,//g' | awk '{s+=$1}END{print s}'
@c0ze
c0ze / phash_deps.sh
Created Apr 22, 2016
phash dependencies for rasbian
View phash_deps.sh
sudo apt-get install libsndfile1 libsndfile1-dev libsamplerate0 libsamplerate0-dev libmpg123-0 libmpg123-dev cimg-dev
@c0ze
c0ze / build.sh
Created Apr 10, 2016
shell script to compile a web/chrome app made with coffee-script / slim
View build.sh
TARGETDIR="./out"
rm -rf $TARGETDIR
# copy html
for file in $(find . -type f -name \*.html); do
dir="./$TARGETDIR/$(dirname ${file})"
mkdir -p "$dir"
cp $file "$dir/$(basename ${file%.*}).html"
@c0ze
c0ze / replace.sh
Created Mar 18, 2016
Recursive replace string in directory
View replace.sh
find `pwd` -iname "*.go" -type f -exec sed -i '' 's:github.com/alecthomas/log4go:github.com/sujrd/log4go:g' {} +
@c0ze
c0ze / ibeacon_scan.sh
Created Dec 25, 2015
A bash script to parse ibeacon packets
View ibeacon_scan.sh
#!/bin/bash
# iBeacon Scan by Arda Karaduman
function parse_ib_uuid {
UUID=`echo $1 | sed 's/^.\{69\}\(.\{47\}\).*$/\1/'`
UUID=`echo $UUID | sed -e 's/\ //g' -e 's/^\(.\{8\}\)\(.\{4\}\)\(.\{4\}\)\(.\{4\}\)\(.\{12\}\)$/\1-\2-\3-\4-\5/'`
}
function parse_ib_major {
MAJOR=`echo $1 | sed 's/^.\{117\}\(.\{5\}\).*$/\1/'`
View eddystone_scan.sh
#!/bin/bash
# Eddystone Scan by Arda Karaduman
# Based on ibeacon_scan by radius networks
# http://stackoverflow.com/questions/21733228/can-raspberrypi-with-ble-dongle-detect-ibeacons
if [[ $1 == "parse" ]]; then
packet=""
capturing=""
count=0
while read line
You can’t perform that action at this time.