Skip to content

Instantly share code, notes, and snippets.


Nazır Doğan nazrdogan

Block or report user

Report or block nazrdogan

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
chrismllr / withNavigationHandlers.js
Created Oct 30, 2017
react-native-navigation: navigation handler HOC
View withNavigationHandlers.js
/* Usage
const navigationHandlers = [
predicate: props => props.currentUser.isAuthenticated === false,
handler: navigator => {
animationType: 'fade'
scottopell /
Last active Nov 20, 2019
Fix corrupted exFAT disk macOS/OSX

exFAT support on macOS seems to have some bugs because my external drives with exFAT formatting will randomly get corrupted.

Disk Utility is unable to repair this at first, but the fix is this:

  1. Use diskutil list to find the right drive id.
  2. You want the id under the IDENTIFIER column, it should look like disk1s1
  3. Run sudo fsck_exfat -d <id from above>. eg sudo fsck_exfat -d disk1s3
  4. -d is debug so you'll see all your files output as they're processed.
  5. Answer YES if it gives you the prompt Main boot region needs to be updated. Yes/No?
haocong / karatsuba.js
Last active Dec 22, 2018
Karatsuba Multiplication in JavaScript
View karatsuba.js
* Karatsuba Multiplication
* @param {Number} x - first number
* @param {Number} y - second number
* @return {Number} Multiply of x and y
function karatsubaMulti(x, y) {
let n = Math.min(('' + x).length, ('' + y).length);
flpwgr /
Created Sep 15, 2015
Cordova Hook for App Transport Security iOS 9
cat << EOF |
Add :NSAppTransportSecurity dict
Add :NSAppTransportSecurity:NSAllowsArbitraryLoads bool YES
while read line
justin-nodeboy / api.js
Last active Sep 9, 2015
A simple API function for calling an endpoint in Titanium, see demo.js for usage
View api.js
Use this function to make calls to a JSON REST API see demo.js for useage
@param options
@param end (Callback)
exports.api = function(options, end) {
//This function makes calls to an Endpoint and then sends the data back via callback to the function that requested it.
//Alloy.CFG.conn_url is set in your config.json file and can be accessed depending on which environment you are using.
var method = options.method,
harshil93 / SampleModel.js
Created Jun 8, 2015
Retrieving / Getting the current user id in a remote method in strongloop's loopback framework.
View SampleModel.js
var loopback = require('loopback');
module.exports = function(SampleModel) {
// Returns null if the access token is not valid
function getCurrentUserId() {
var ctx = loopback.getCurrentContext();
var accessToken = ctx && ctx.get('accessToken');
var userId = accessToken && accessToken.userId;
return userId;
FokkeZB / !
Last active Apr 13, 2016
Facebook's css-layout for Titanium
View !

Facebook's css-layout for Titanium

Exploring how it could be used to have a more iOS-autolayout-like layout system on Titanium.

Getting the script to work

  1. Put Layout.js in app/lib.
  2. Put the below computeLayout.js in app/lib to fix this.
  3. Use the below alloy.js and confirm it to work.
View sticky-table-headerview.js
// just a quick n dirty test. See result:
var headerView = Ti.UI.createView({
RLTmultimedia / readme.txt
Created Apr 7, 2014
Create route in titanium map module
View readme.txt
Create a file in your lib folder, like **rootproject**/lib/
load the module in your file and initialize with the data:
var jsonCoordinates = {
'destination': dest.latitude + ',' + dest.longitude,
'origin': origin.latitude + ',' + origin.longitude,
var routes = require("")(jsonCoordinates, mapview);
# -*- coding: utf-8 -*-
# created by giginet on 2014/02/27
import sys
from PIL import Image
(29, 29),
(40, 40),
You can’t perform that action at this time.