Skip to content

Instantly share code, notes, and snippets.

View yozef's full-sized avatar

Joseph yozef

  • Boston - San Francisco - Montréal
View GitHub Profile
0x3679D70639EbA8DD0F461c5Ed4FAeA9475b064bB
0xbCD67BbE79E310CE78359618370A1f8e22A69e3C
@yozef
yozef / ETH Kovan Address
Created October 8, 2017 22:51
Kovan Eth Faucet
0x8a7DDB7C3322D6DeBc709F6ca3454f3B07804103
@yozef
yozef / ETH Kovan Address
Created October 8, 2017 21:10
Kovan Faucet
0x31cC92cD183c4ba876E5B46A7750C0D9FC0199a7
@yozef
yozef / TableView Index Array Creator
Created May 17, 2017 19:13
TableView Indexes require an array of [{index: i, title: first_char_name}] this loop creates the rows + the index array
var indexArray = [];
var currentChar = '';
var lastChar = '';
// the Array e.places is already sorted alphabetically from ACS with order:'name' in query
for (var i = 0; i < e.places.length; i++) {
var farm = e.places[i];
// create an index of first chars of the farm name
currentChar = farm.name.charAt(0);
if (i == 0) indexArray.push({title: currentChar, index: i});
else {
@yozef
yozef / Ti Android SHA-1
Last active February 28, 2017 15:40 — forked from FokkeZB/shell
Get the Key Hash for Titanium's develoment keystore (replace 5.5.1.GA with your version)
Open Terminal:
keytool -exportcert -alias androiddebugkey -keystore ~/Library/Application Support/Titanium/mobilesdk/osx/6.0.1.GA/android/dev_keystore | openssl sha1 -binary | openssl base64
keytool -exportcert -alias tidev -keystore ~/Library/Application\ Support/Titanium/mobilesdk/osx/6.0.1.GA/android/dev_keystore -list -v
@yozef
yozef / index.js
Created September 14, 2016 15:29
Apple Maps iOS 10 : Place Card Swipe
// Vars
var olt = Titanium.UI.create2DMatrix(), curX, curY;
var initialTop = Alloy.Globals.halfScreenY;
var currentViewTop = initialTop; // 100% = curY
var swipeDisplacementPercentage = 1; // 0 is at the floor, 2 is all the way to the top
var deltaX, deltaY;
$.contentArea.addEventListener('touchstart', function(e) {
curX = e.x;
@yozef
yozef / icao
Last active August 29, 2015 14:01
ICAO JSON Airport Codes & names
{icao:"AGAF",name:"Afutara Airport"},
{icao:"AGAR",name:"Ulawa Airport"},
{icao:"AGAT",name:"Uru Harbour"},
{icao:"AGBA",name:"Barakoma Airport"},
{icao:"AGBT",name:"Batuna Airport"},
{icao:"AGEV",name:"Geva Airport"},
{icao:"AGGA",name:"Auki Airport"},
{icao:"AGGB",name:"Bellona/Anua Airport"},
{icao:"AGGC",name:"Choiseul Bay Airport"},
{icao:"AGGD",name:"Mbambanakira Airport"},
@yozef
yozef / example.js
Last active March 25, 2017 15:58 — forked from nulltask/usage.js
Appcelerator Titanium XML-RPC example.
var xmlrpc = require('./lib/xmlrpc');
var client = xmlrpc.createClient({
url: 'https://api.example.com/XML-RPC'
, username: 'xxxx'
, password: 'xxxx'
});
client
.call('foo.methodName')
@yozef
yozef / TiCloudinary
Last active February 28, 2017 15:39
Appcelerator Titanium code for uploading image to Cloudinary + fetching transparency version. rawImage is the TiBlob Object.
// Register for an Account ☞ http://cloudinary.com/invites/lpov9zyyucivvxsnalc5/n8b98rtyuredob4geg2z
// replace these
var cloudinaryCloudName = 'Your_Cloud_Name';
var cloudinaryAPIKey = 999999999999;
var cloudinaryAPISecret = 'XXXXXXXXXX-XXXXX-XX';
// call this function & pass in TiBlob Object
function cloudImageClean(rawImage) {
var nowUnix = moment().unix(); // requires momentjs