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 / sakin_yapma.sh
Created August 20, 2013 13:58
bunu sakın yapmayın
#!/usr/bin/sh
#
# bunu sakın yapmayın
#
iptable -F && iptables -P INPUT DROP && iptables -P OUTPUT DROP && iptables -P FORWARD DROP && reboot
@hmert
hmert / get_table_and_column_names.sql
Created August 2, 2013 13:48
getting all column names from all tables in Mysql without having to list all the tables
select TABLE_SCHEMA,TABLE_NAME,COLUMN_NAME from information_schema.columns
where table_schema = 'eba'
order by table_name,ordinal_position limit 10000
if(!String.prototype.reverse)
{
Object.defineProperty(String.prototype, 'stripTags',
{
value: function()
{
return this.replace(/<\/?[^>]+>/gi, '');
},
enumerable: false
});
window.shuffleArray = (function() {
return function(arr) {
for(var j, x, i = arr.length; i; j = parseInt(Math.random() * i), x = arr[--i], arr[i] = arr[j], arr[j] = x);
return arr;
}
})();
<?php
function recursive_directory($dirname,$maxdepth=10, $depth=0){
if ($depth >= $maxdepth) {
return false;
}
$subdirectories = array();
$files = array();
if (is_dir($dirname) && is_readable($dirname)) {
$d = dir($dirname);
while (false !== ($f = $d->read())) {
find . -maxdepth 3 -name "*.mp4" -print0 | xargs -I '{}' -r0 mv '{}' ../videolar_new/
find / -type f -size +100000k -exec ls -lh {} \; | awk '{ print $9 ": " $5 }'
<?php
/*
$ip = '208.86.158.195';
foreach ( array('8.8.8.8', '156.154.70.1', '208.67.222.222', '156.154.70.1', '209.244.0.4', '216.146.35.35') as $dns) {
echo gethostbyaddr_timeout( $ip, $dns, 1 );
}
*/
@hmert
hmert / renew_open_with.sh
Created April 22, 2013 08:31
Macox dublicate open with item solver
/System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/Support/lsregister -kill -r -domain local -domain system -domain user
@hmert
hmert / ilan
Last active December 11, 2015 21:48
Fatih Projesi için Front-end Developer
Değerli arkadaşım,
Böyle jquery backbone underscore ile uçup kaçabilecek; html5 ve css3 ile taklalar attırabilecek;
üstelik PHP'yi master ile bitirebilecek insan evladı olduğunu biliyorum.
Bunlar üzerine sayacağın tüm özelliklerin bizim için bonus olacak.
SOA'yı, WSDL'ı, HMVC'yi, JSON'ı, Bowling'i, birlikte gezip tozmayı, ekip içinde sunum yapabilmeyi,
denileni vaktinde yapmayı, git pull, git push, git commit -m 'hebele' yi zaten bildiğini var sayıyorum.
Ve görüşme sırasında bu konulardan söz açtığımızda Beşiktaş tirübünündeki gibi
heyecanla bize cevap verebileceksin buna eminim.