Skip to content

Instantly share code, notes, and snippets.

🏠
Working from own office

Sinan Eldem sineld

🏠
Working from own office
Block or report user

Report or block sineld

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@brandonaaskov
brandonaaskov / jQuery Change Event: Proper Binding
Created Jan 11, 2012
jQuery's change() event doesn't work as expected with input text fields. This, however, does work.
View jQuery Change Event: Proper Binding
/*
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 Jan 19, 2012
Run MailCatcher in the background, always, on OS X
View README.md

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 Sep 13, 2019
Awesome PHP — A curated list of amazingly awesome PHP libraries, resources and shiny things.
View awesome-php.md
View sineld.php
<?php
echo 'hayır hayır amca dedi';
?>
View json-php.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 Jul 12, 2012
URL Slugs in Javascript (with UTF-8 and Transliteration Support)
View url_slug.js
/**
* 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 Jul 25, 2012
My dd replace
View helpers.php
<?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 Dec 15, 2015
zsh-scripts/bin/setup-sync-sublime-over-dropbox.sh
View 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
#
View how-to-install-memcache-on-mamp-2.md

How To Install Memcache on MAMP 2

  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.
  7. Add extension=memcache.so to your php.ini
    • MAMP Pro: /Applications/MAMP\ Pro/MAMP\ PRO.app/Contents/Resources/php[your php version].ini
@clouddueling
clouddueling / is_64_bit.php
Created Dec 9, 2012
Is my php server 64 bit?
View is_64_bit.php
<?php
// http://ideone.com/JWKIf
function is_64bit() {
$int = "9223372036854775807";
$int = intval($int);
if ($int == 9223372036854775807) {
/* 64bit */
return true;
You can’t perform that action at this time.