Skip to content

Instantly share code, notes, and snippets.

@poorcoder
poorcoder / AndroidManifest.xml
Created May 15, 2016 18:53 — forked from gabouh/AndroidManifest.xml
NativeScript Splash Screen for Android
File from app/App_Resources/Android/AndroidManifest.xml
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="__PACKAGE__"
android:versionCode="1"
android:versionName="1.0">
<supports-screens
android:smallScreens="true"
@poorcoder
poorcoder / base64.js
Created October 20, 2014 02:42
Base64 dönüşüm fonksiyonları / base64toInt - intToBase64
/*Base64 dönüşüm fonksiyonları*/
function intToBase64(i) {
var b64 = '';
b64 += String.fromCharCode((i % 64) + 63);
for (var j = 0; j < 4; j++) {
i = Math.floor(i / 64);
b64 += String.fromCharCode((i % 64) + 63);
}
return b64;
@poorcoder
poorcoder / eatenCakes.js
Last active August 29, 2015 14:07
Pete Hodgson talks about how we can expand our programming minds by using JavaScript in unusual and experimental ways in his presentation from Forward JS. http://www.youtube.com/watch?v=n9qzwI4Krmo
/*
* Pete Hodgson talks about how we can expand our programming minds by
* using JavaScript in unusual and experimental ways in his presentation
* from Forward JS.
* http://www.youtube.com/watch?v=n9qzwI4Krmo
*/
cakes = ["coffee", "cheese", "bundt", "angel"];
function Person() {
@poorcoder
poorcoder / gist:1474851
Created December 14, 2011 01:48
Bind node-validator to req
/*
* This binds the node-validator library to the req object so that
* the validation / sanitization methods can be called on parameter
* names rather than the actual strings.
*
* 1. Be sure to include `req.mixinParams()` as middleware to merge
* query string, body and named parameters into `req.params`
*
* 2. To validate parameters, use `req.check(param_name, [err_message])`
* e.g. req.check('param1').len(1, 6).isInt();