This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# Commit this file to your project somewhere, then instruct teammates who wants to opt in to symlink to run the hook: | |
# ln -sf ../../pre-commit .git/hooks/pre-commit | |
# To capture user input | |
exec < /dev/tty | |
./style_check # or wherever you keep the style_check script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"empty_reward" : "There are no rewards in the catalog right now. Please check back again while we add more rewards.", | |
"loading_reward" : "Loading Rewards", | |
"error" : "Something wrong, please close and open again later.", | |
"login_title_text" : "Login/Sign up", | |
"login_subline" : "to redeem rewards", | |
"login_headline" : "<p>Please login or signup to</p><p>earn points and redeem rewards</p>", | |
"login_button" : "Login/Signup <img data-src='{{root}}navigation-arrow.png'>", | |
"help_link" : "How do I earn points?", | |
"reward_tab_title" : "Reward", | |
"reward_tab_profile" : "Profile", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
//error_reporting(0); | |
$key = '<CONSUMER KEY>'; //Get this from Gimmie portal after creating Game | |
$secret = '<SECRET KEY>'; //Get this from Gimmie portal after creating Game | |
$user_id = $_GET["u"]; //This is a demo but do use a more secure way to get the user ID (cookie/session instead) | |
$player_uid = $user_id; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'oauth' | |
site = 'https://api.gimmieworld.com' | |
consumer = OAuth::Consumer.new('key', 'secret', :site => site) | |
token = OAuth::AccessToken.new(consumer, 'userid', 'secret') | |
response = token.get('/1/profile.json') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="gimmie-root"></div> | |
<script type="text/javascript"> | |
var _gimmie = { | |
"endpoint" : "/gimmie-connect?gimmieapi=", //for Rack example above, change this field to "/gimmieapi=" | |
"gimmie_endpoint" : "https://api-rtqa.gimmieworld.com", // An optional endpoint for bypassing secret authentication, for open API like /categories.json | |
"key" : "###################", //get consumer_key from the portal | |
"country" : "SG", //country code which affects visible rewards | |
"locale" : "us", //locale | |
//remove the user field below if no user has signed in |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var Client = require('gimmie-node').Client; | |
var client = new Client({ | |
oauth_key: 'key', | |
oauth_secret: 'secret', | |
url_prefix: 'https://api.gimmieworld.com' | |
}) | |
client.get('/1/trigger.json?event_name=event', 'test', | |
function (error, response) { | |
if (error) return; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Only tested in Firefox with firebug | |
// -> Install the firebug addon | |
// -> Open firebug console / press F12 | |
// -> Copy and paste this code | |
// -> Click run | |
//To change strategy, uncomment one and comment out the other: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Adobe Illustrator Script that exports each layer into PNG files according to its layer name, | |
* as well as making copies for various screen sizes. | |
* | |
* (1)The illustrator document should has dimensions in xxhdpi. | |
* One xxhdpi screen is nexus5 (480dpi) with dimensions 1920x1080px | |
* Launcher icon at baseline 48x48dp is 48x48px for mdpi | |
* so the lanucher_icon layer should be at 144x144px inside the illustrator document to be exported. | |
* | |
* (2)Modify the destination android project in line33 |