Skip to content

Instantly share code, notes, and snippets.

Hasan Keklik keklikhasan

View GitHub Profile
@keklikhasan
keklikhasan / .bash_profile
Last active Dec 5, 2019
Common aliases I used
View .bash_profile
##### COMMON
export PROFILE_FILE='~/.zshrc' # for zshrc
#export PROFILE_FILE='~/.bash_profile' # for bash
alias al="vi $PROFILE_FILE"
alias ap="source $PROFILE_FILE"
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias gradle='./gradlew'
alias ll='ls -al'
@keklikhasan
keklikhasan / UsbCecConnection.java
Created Aug 28, 2018 — forked from sdabet/UsbCecConnection.java
Send simple HDMI-CEC commands from an Android app via Pulse-Eight's USB-CEC adapter
View UsbCecConnection.java
import android.hardware.usb.UsbDevice;
import android.hardware.usb.UsbDeviceConnection;
import android.util.Log;
import com.felhr.usbserial.UsbSerialDevice;
import com.felhr.usbserial.UsbSerialInterface;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
@keklikhasan
keklikhasan / schemaspy.sh
Created Jul 25, 2018
document your database via schemaspy http://schemaspy.org/
View schemaspy.sh
#!/bin/bash
dt=$(date "+%Y_%m_%d_%H_%M_%s")
echo $dt
folder="[PATH]/schmaspy"
if [ -d "$folder" ]; then
mv "$folder" "${folder}_backup_$dt"
fi
mkdir "$folder"
# for more info http://schemaspy.org/
docker run -v "$folder:/output" schemaspy/schemaspy:snapshot -hq -t pgsql -u postgres -db postgres -host host.docker.internal -port 5432 -all
@keklikhasan
keklikhasan / clean_docker.sh
Last active Dec 5, 2019
DEPRECATED clean docker via spotify docker-gc
View clean_docker.sh
#!/bin/bash
docker run --rm -v /var/run/docker.sock:/var/run/docker.sock -v /etc:/etc -e REMOVE_VOLUMES=1 spotify/docker-gc
@keklikhasan
keklikhasan / git_pull_all.sh
Created Jul 25, 2018
git fetch and pull all projects
View git_pull_all.sh
#!/bin/bash
# TODO get params from arguments add git command for pass prompt vs..
WORKING_DIRECTORY="[WORKING_DIRECTORY]"
TARGET_BRANCH="develop"
#trim branch
TARGET_BRANCH="$(echo $TARGET_BRANCH| xargs)"
#trim working directory
WORKING_DIRECTORY="$(echo $WORKING_DIRECTORY| xargs)"
#remove last '/' from working directory
View .bash_alieses
alias al='vi ~/.bash_aliases'
alias egrep='egrep --color=auto'
alias fgrep='fgrep --color=auto'
alias grep='grep --color=auto'
alias ll='ls -la'
alias up='cd ..'
alias home='cd ~'
alias desktop='cd ~/Desktop'
alias dev='cd ~/dev'
alias projects='cd ~/dev/projects'
View .gitconfig
[user]
email = keklikhasan@gmail.com
name = Hasan Keklik
[core]
autocrlf = input
[color]
diff = auto
status = auto
branch = auto
[svn]
You can’t perform that action at this time.