Skip to content

Instantly share code, notes, and snippets.

View caner's full-sized avatar

Caner Gural caner

View GitHub Profile
# javascript color scheme for nano editor
syntax "JavaScript" "\.(js)$"
# Default
color white "^.+$"
# Decimal, octal and hexadecimal numbers
color yellow "\<[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\>"
# Floating point number with at least one digit before decimal point
color yellow "\<[-+]?([0-9]+\.[0-9]*|[0-9]*\.[0-9]+)([EePp][+-]?[0-9]+)?[fFlL]?"
color yellow "\<[-+]?([0-9]+[EePp][+-]?[0-9]+)[fFlL]?"
# Keywords
@caner
caner / 0_reuse_code.js
Created October 21, 2013 13:35
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@caner
caner / conventional-try-catch-finally.java
Created November 6, 2013 14:19
try-with-resources sample
/*geleneksel try-catch-finally bloku:
* genellikle finally blokunda kullanılan stream, reader vs. kapatılır
*/
static String readFirstLineFromFileWithFinallyBlock(String path)
throws IOException {
BufferedReader br = new BufferedReader(new FileReader(path));
try {
return br.readLine();
} finally {
@caner
caner / YayinAkisi.java
Created February 2, 2014 14:30
02012014 soru-cevap
package com.example.dene;
import org.json.JSONObject;
import android.app.Activity;
import android.os.AsyncTask;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
package com.example.locationmanager;
import android.app.Activity;
import android.content.Context;
import android.location.LocationManager;
import android.os.Bundle;
import android.util.Log;
import android.widget.TextView;
public class LocationManagerTestActivity extends Activity {
var bireyselOption, takimOption, takimUyeSayisiOption, ikiKisiOption, ucKisiOption, kisiSayisi;
document.addEventListener("DOMContentLoaded", function (event) {
bireyselOption = document.getElementById("edit-field-tmm-basvurusekli-und-bireysel");
takimOption = document.getElementById("edit-field-tmm-basvurusekli-und-takim");
takimUyeSayisiOption = document.getElementsByName("field_tmm_takimkackisi[und]");
ikiKisiOption = document.getElementById("edit-field-tmm-takimkackisi-und-2");
ucKisiOption = document.getElementById("edit-field-tmm-takimkackisi-und-3");

Keybase proof

I hereby claim:

  • I am caner on github.
  • I am cgural (https://keybase.io/cgural) on keybase.
  • I have a public key ASAD0N3Kp44fY_DMZG8s6yWYBsqRGcWV5qN53JU1nqptxQo

To claim this, I am signing this object: