Skip to content

Instantly share code, notes, and snippets.

View hmert's full-sized avatar
🎃
fintech

Hüseyin Mert hmert

🎃
fintech
View GitHub Profile
@hmert
hmert / aire.sh
Created December 8, 2010 22:08 — forked from r00tw33d/aire.sh
#!/bin/bash
# aire.sh
# Este script utiliza las siguientes herramientas:
# macchanger, aircrack-ng [sudo apt-get install macchanger aircrack-ng]
# Su finalidad es semi-automatizar el crackeo de WEP keys (únicamente WEP, no WPA)
# con una poca interveción del usuario
#
#####################################################################################.
# Disclaimer: #
@hmert
hmert / gist:734002
Created December 8, 2010 22:08 — forked from sayz/gist:619255
cd /tmp
sudo apt-get install xclip
wget http://github.com/dblevins/gistpaste/raw/master/gistpaste
chmod 755 gistpaste
sudo mv gistpaste /usr/local/bin/
git clone git://gist.github.com/618030.git
cd 618030
/usr/lib/gnome-panel/gnome-panel-add --panel=top_panel_screen0 --copy-launcher --launcher=gistpaste.desktop
# üst panelde artık bir ikon olmalı
# şimdi... herhangi bir metni seç ve o ikona tıkla
@hmert
hmert / mygist-1
Created December 8, 2010 22:12 — forked from m040601/mygist-1
#!/bin/bash
url='http://www.last.fm/music/+free-music-downloads?page=1'
num=$(wget -O- -q "$url" | awk -vRS="</[aA]>" '/class=\"lastpage\"/ {gsub(/.*>/,""); print}')
for((i=1;i<=$num;i++))
do
url="http://www.last.fm/music/+free-music-downloads?page=$i"
wget -O- -q $url | awk 'BEGIN{ RS="</[aA]>" }
/http:\/\/freedownloads.last/{
gsub(/.*href=[\047\042]/,"")
#!/bin/bash
# Using `ffmpeg` to convert an arbitrary video file to an ipad-compatible M4V (h264+AAC)
# file. Mac-specific since libfaac has occasional audio glitches and the `afconvert` command
# is of a much higher quality (since it uses the system's Quicktime libs).
# Assumes ffmpeg and x264 (and other libs ffmpeg uses to decode various video formats
# you want) are installed.
#
# Easy mode:
# * Install homebrew: http://github.com/mxcl/homebrew
$.fn.forcenumber = function() {
return this.blur(function() {
var that = $(this),
val = that.val(),
num = parseFloat(val, 10),
min = parseFloat(that.attr('min')),
max = parseFloat(that.attr('max'));
if (!val.match(/^-?[0-9]+(\.[0-9]+)?+$/))
return that.val(val.replace(/^.*?(-?[0-9]+(\.[0-9]+)?+).*$/, '$1'))
#!/bin/bash
: ${user:=${1:-$USER}}
: ${host:=${2}}
: ${sshport:=${3:-22}}
: ${localport:=${4}}
: ${remoteport:=${5}}
: ${remotehost:=${6:-localhost}}
echo "Tunneling to ${remotehost} via ${user}@${host}:${sshport} : ${localport} --> ${remoteport}"
<style type="text/css">
@import url(/statik/css/genel.css);
@import url(/statik/css/anasayfa.css);
@import url(/statik/css/firmaara_min.css);
@import url(/statik/css/ilanlar.css);
</style>
<!--[if IE 6]>
<script type="text/javascript" src="/statik/js/ie6_bgiframe.js"></script>
<?php
interface DatabaseAdapterInterface
{
function connect();
function disconnect();
function query($query);
$("a.ajax").live("click", function() {
// do ajax query, then
history.pushState(null, document.title, this.href);
return false;
});
@hmert
hmert / gist:760479
Created December 30, 2010 23:25 — forked from troelskn/gist:332256
/**
* Wrapper to execute a remote command over ssh.
* @param $ssh Connection from ssh2_connect
* @param $command string to execute on shell
* @returns string
*/
function ssh2_exec_command($ssh, $command, $retry = 5) {
// The `sleep` is a nasty hack to account for some kind of timing bug in ssh2
$sleep = 0;
$stream = false;