Skip to content

Instantly share code, notes, and snippets.

View sineld's full-sized avatar
🏢
Full Stack Developer

Sinan Eldem sineld

🏢
Full Stack Developer
View GitHub Profile
@brandonaaskov
brandonaaskov / jQuery Change Event: Proper Binding
Created January 11, 2012 21:34
jQuery's change() event doesn't work as expected with input text fields. This, however, does work.
/*
For some reason, the change() event only fires when the input field loses focus.
Binding to other options ('change keypress paste focus textInput input') will
fire the event several times, which is bad. The below code works even when
content is pasted into the text field, and only fires once as expected.
*/
$('#search-form .term').bind('input', function(){
console.log('this actually works');
});
@sj26
sj26 / README.md
Created January 19, 2012 07:41
Run MailCatcher in the background, always, on OS X

Place me.mailcatcher.plist into ~/Library/LaunchAgents, then run launchctl load ~/Library/LaunchAgents/me.mailcatcher.plist.

If you use pow, echo 1080 > ~/.pow/mailcatcher and go to http://mailcatcher.dev, otherwise use http://localhost:1080.

Currently pow doesn't seem to pass websockets through correctly. Looking into this.

@ziadoz
ziadoz / awesome-php.md
Last active April 17, 2024 21:06
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
@sineld
sineld / sineld.php
Created February 23, 2012 11:45
Sinan Eldem
<?php
echo 'hayır hayır amca dedi';
?>
@sineld
sineld / json-php.php
Created April 28, 2012 20:20
Json and php
<?php
$dizi = array('koca' => array('isim' => 'sinan', 'yas' => 31), 'es' => array('isim' => 'bilge', 'yas' => 22));
echo 'Php: ';
var_dump($dizi).'<br>';
$d = json_encode($dizi);
echo 'Json (encoded): ';
@sgmurphy
sgmurphy / url_slug.js
Created July 12, 2012 02:05
URL Slugs in Javascript (with UTF-8 and Transliteration Support)
/**
* Create a web friendly URL slug from a string.
*
* Requires XRegExp (http://xregexp.com) with unicode add-ons for UTF-8 support.
*
* Although supported, transliteration is discouraged because
* 1) most web browsers support UTF-8 characters in URLs
* 2) transliteration causes a loss of information
*
* @author Sean Murphy <sean@iamseanmurphy.com>
@sineld
sineld / helpers.php
Created July 25, 2012 07:18
My dd replace
<?php
/**
* Dump the given value and kill the script or continue.
*
* <code>
* // Dump the $data variable and kill the script
* d($data);
*
* // Dump the $data variable and continue the script
* d($data,1);
@sineld
sineld / setup-sync-sublime-over-dropbox.sh
Last active December 15, 2015 12:34
zsh-scripts/bin/setup-sync-sublime-over-dropbox.sh
#!/bin/sh
#
# Original URL: https://github.com/miohtama/ztanesh/blob/master/zsh-scripts/bin/setup-sync-sublime-over-dropbox.sh
# Set-up Sublime settings + packages sync over Dropbox
# Kullanım: $sh dosya.sh
# Will sync settings + Installed plug-ins
#
# Tested on OSX - should support Linux too as long as
# you set-up correct SOURCE folder
#
@jakebellacera
jakebellacera / how-to-install-memcache-on-mamp-2.md
Last active July 4, 2021 16:09
How To Install Memcache on MAMP 2

How To Install Memcache on MAMP 2

Note: This is an old guide and may not work for newer versions of macOS. Please see comments below for additional steps.

  1. Install memcached. I'd suggest using homebrew. brew install memcached
  2. Select your desired version of PHP that you'd like to use in MAMP. This dropdown is located in the PHP tab in MAMP PRO.
  3. Visit the Downloads Page on php.net and download the source code. If your release isn't listed, visit the Releases page.
  4. Extract the source into /Applications/MAMP/bin/php/[php version folder]/include/php.
  5. /Applications/MAMP/bin/php/[php version folder]/include/php/configure
  6. /Applications/MAMP/bin/php/[php version folder]/bin/pecl i memcache.
@clouddueling
clouddueling / is_64_bit.php
Created December 9, 2012 18:45
Is my php server 64 bit?
<?php
// http://ideone.com/JWKIf
function is_64bit() {
$int = "9223372036854775807";
$int = intval($int);
if ($int == 9223372036854775807) {
/* 64bit */
return true;