Skip to content

Instantly share code, notes, and snippets.

View coderkan's full-sized avatar
🏠
Working from home

Erkan Güzeler coderkan

🏠
Working from home
View GitHub Profile
/*
jQuery UI Autocomplete AutoFill extension
automatically fills in the input box when only one suggestion is to be shown
*/
;(function($) {
$.extend($.ui.autocomplete.options, {autoFill: true});
$.extend($.ui.autocomplete.prototype, {
_response_original: $.ui.autocomplete.prototype._response,
@joelverhagen
joelverhagen / README.md
Created February 12, 2012 02:14
Jekyll YouTube Embed Plugin

This is a plugin meant for Jekyll.

Example use:

Easily embed a YouTube video. Just drop this file in your _plugins directory.

{% youtube oHg5SJYRHA0 %}
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@awidegreen
awidegreen / vim_cheatsheet.md
Last active June 17, 2024 03:41
Vim shortcuts

Introduction

  • C-a == Ctrl-a
  • M-a == Alt-a

General

:q        close
:w        write/saves
:wa[!]    write/save all windows [force]
:wq       write/save and close
@gladson
gladson / jquery.maskedinput-1.2.2.js
Created November 23, 2012 06:20
Masked Input plugin for jQuery
/// <reference path="../../../lib/jquery-1.2.6.js" />
/*
Masked Input plugin for jQuery
Copyright (c) 2007-2009 Josh Bush (digitalbush.com)
Licensed under the MIT license (http://digitalbush.com/projects/masked-input-plugin/#license)
Version: 1.2.2 (03/09/2009 22:39:06)
*/
(function($) {
var pasteEventName = ($.browser.msie ? 'paste' : 'input') + ".mask";
var iPhone = (window.orientation != undefined);
@prime31
prime31 / gist:5675017
Last active May 28, 2024 11:37
Simple PHP script showing how to send an Android push notification. Be sure to replace the API_ACCESS_KEY with a proper one from the Google API's Console page. To use the script, just call scriptName.php?id=THE_DEVICE_REGISTRATION_ID
<?php
// API access key from Google API's Console
define( 'API_ACCESS_KEY', 'YOUR-API-ACCESS-KEY-GOES-HERE' );
$registrationIds = array( $_GET['id'] );
// prep the bundle
$msg = array
@onuryilmaz
onuryilmaz / ReplaceTurkishChars.java
Last active December 14, 2023 10:47
Replace Turkish Characters
public static String clearTurkishChars(String str) {
String ret = str;
char[] turkishChars = new char[] {0x131, 0x130, 0xFC, 0xDC, 0xF6, 0xD6, 0x15F, 0x15E, 0xE7, 0xC7, 0x11F, 0x11E};
char[] englishChars = new char[] {'i', 'I', 'u', 'U', 'o', 'O', 's', 'S', 'c', 'C', 'g', 'G'};
for (int i = 0; i < turkishChars.length; i++) {
ret = ret.replaceAll(new String(new char[]{turkishChars[i]}), new String(new char[]{englishChars[i]}));
}
return ret;
}
@kaku87
kaku87 / parent.html
Created July 22, 2013 08:48
javascript popup close callback event.
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Popup Example</title>
</head>
<body>
<script>
function popupCallback(str){
alert("This is callback:" + str);
}
{
"title": "QLight Project Structure",
"visbility": "public"
}