Skip to content

Instantly share code, notes, and snippets.

View hmert's full-sized avatar
🎃
fintech

Hüseyin Mert hmert

🎃
fintech
View GitHub Profile
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.
@hmert
hmert / gist:4175466
Created November 30, 2012 12:20 — forked from berkerpeksag/gist:4172064
Bir Git deposundaki herhangi bir dosyayı ya da klasörü tüm geçmişiyle beraber başka bir depoya taşımak
# Taşınacak depo
$ git log --pretty=email --patch-with-stat --reverse -- src/etc/vim/ > vim.patch
# Yeni depo
$ git init
$ git am < vim.patch
@hmert
hmert / gist:3368502
Created August 16, 2012 08:52
Sublime BASH
sudo ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" /usr/local/bin/subl
<?php
function data_uri($file, $mime) {
$contents=file_get_contents($file);
$base64=base64_encode($contents);
echo "data:$mime;base64,$base64";
}
trait JSONized {
public function toJson()
{
$properties = get_object_vars($this);
return json_encode($properties);
}
}
<img src="blank.gif" class="lazy" data-src="/images/full-size.jpg" width="240" height="152"></a>​
/* lazyload.js (c) Lorenzo Giuliani
* MIT License (http://www.opensource.org/licenses/mit-license.html)
*
* expects a list of:
* `<img src="blank.gif" data-src="my_image.png" width="600" height="400" class="lazy">`
*/
!function(window){
var $q = function(q, res){