Skip to content

Instantly share code, notes, and snippets.

@s4l1h
s4l1h / karabiner-import.sh
Created March 19, 2015 02:23
Apple olmayan klavye için ayarlar. Windows klavye ve hackingtosh kullananlara.
#!/bin/sh
cli=/Applications/Karabiner.app/Contents/Library/bin/karabiner
$cli set remap.find_winstyle_no_term 1
/bin/echo -n .
$cli set remap.optionL2commandL 1
/bin/echo -n .
$cli set remap.controlL2commandL 1
/bin/echo -n .
@s4l1h
s4l1h / socketPost.js
Created January 16, 2015 01:35
socketPost.js
var net = require('net');
function HttpRequest(host, port, path, method) {
return {
headers: [],
port: 80,
path: "/",
method: "POST",
socket: null,
_setDefaultHeaders: function() {
@s4l1h
s4l1h / testcookie.sh
Created December 30, 2014 00:56
Nginx + Test Cookie Module installer
export CFLAGS=-Wno-error
cd /root
apt-get -y install build-essential git libpcre++-dev zlibc zlib1g zlib1g-dev libssl-dev
git clone https://github.com/kyprizel/testcookie-nginx-module
wget http://nginx.org/download/nginx-1.6.2.tar.gz
tar -xvf nginx-1.6.2.tar.gz
cd /root/nginx-1.6.2/
./configure --add-module=/root/testcookie-nginx-module
make
@s4l1h
s4l1h / gist:baeb0fb2252bf93317e1
Last active August 29, 2015 14:07
Linux yeni disk eklemek
####### fdisk İle Diskte partition oluşturalım #######
root@server:~# fdisk /dev/sdc
Device contains neither a valid DOS partition table, nor Sun, SGI or OSF disklabel
Building a new DOS disklabel with disk identifier 0xddb8b91d.
Changes will remain in memory only, until you decide to write them.
After that, of course, the previous content won't be recoverable.
Warning: invalid flag 0x0000 of partition table 4 will be corrected by w(rite)
@s4l1h
s4l1h / tinypng.sh
Last active November 16, 2015 12:04
tinypng.com api bash script | make "old" and "new" directory put files old directory.
APIKEY="";
for f in old/*.png
do
echo "Compressed- $f"
OPT=`curl -i --user api:$APIKEY --data-binary @$f https://api.tinypng.com/shrink | sed -ne 's/.*"\(http[^"]*\).*/\1/p'`
echo $OPT
ORG_FILE=`sed "s/old\///g" <<<"$f"`
curl $OPT -o new/$ORG_FILE
done
# Default setup is given for MySQL with ruby1.8. If you're running Redmine
# with MySQL and ruby1.9, replace the adapter name with `mysql2`.
# Examples for PostgreSQL and SQLite3 can be found at the end.
production:
adapter: mysql2
database: redmine
host: localhost
username: redmine
password: ******
{
"ilceAd" : "Aricak",
"ilceAdTitle" : "Aricak",
"ilceAdSlug" : "aricak",
"Ilce" : "E",
"ilceKod" : 392,
"toplamSandik" : 10,
"acilanSandik" : 0,
"kalanSandik" : 10,
"acilanSandikOran" : 0,
@s4l1h
s4l1h / setup.sh
Created January 1, 2014 19:56
memorycoin mining script for http://mmc.1gh.com
#!/bin/bash
clear
if [ "$#" -eq "0" ];then
echo "Usage: sh $0 YOURMMCADRESS threadSize(optional)"
echo "Example: sh $0 MQoJDguWCMAug2J2rRUEsZPC9UjdSCppkS 4"
exit
fi
if [ "$#" -lt 2 ];then
@s4l1h
s4l1h / setup.sh
Last active January 1, 2016 09:58
memorycoin mining script for mmcpool.com
#!/bin/bash
clear
if [ "$#" -eq "0" ];then
echo "Usage: sh $0 YOURMMCADRESS threadSize(optional)"
echo "Example: sh $0 MQoJDguWCMAug2J2rRUEsZPC9UjdSCppkS 4"
exit
fi
if [ "$#" -lt 2 ];then
@s4l1h
s4l1h / setup.sh
Last active January 1, 2016 08:39
memorycoin mining script
#!/bin/bash
clear
if [ "$#" -eq "0" ];then
echo "Usage: sh $0 YOURMMCADRESS threadSize(optional)"
echo "Example: sh $0 MQoJDguWCMAug2J2rRUEsZPC9UjdSCppkS 4"
exit
fi
if [ "$#" -lt 2 ];then