Skip to content

Instantly share code, notes, and snippets.

View jlehman's full-sized avatar
🎯
Build Something Great

Josh Lehman jlehman

🎯
Build Something Great
View GitHub Profile
@jlehman
jlehman / 0_reuse_code.js
Last active August 29, 2015 14:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
-------------------------------------BEGIN--------------------------------------
Inspecting project: /Developer/apps/refnet-ios/RefNet.xcodeproj/project.pbxproj
--------------------------------------------------------------------------------
Finding your project's sub-projects...
Sub-project: {'path': 'CordovaLib/CordovaLib.xcodeproj', 'name': 'CordovaLib.xcodeproj', 'sourceTree': '<group>'}
addLocales: ->
@$("#allLocales").empty()
_that = @
_.each @locales_collection, (locale) ->
_that.$("#allLocales").append("<option value='#{locale.get('id')}'>#{locale.get('name')}</option>")
String orientation = getString(R.string.orientation);
Log.i("Orientation String",orientation);
if (orientation == "portrait") {
Log.i("Orientation String","SHOULD LOCK TO PORTRAIT");
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);
} else {
Log.i("Orientation String","SHOULD LOCK TO LANDSCAPE");
setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_LANDSCAPE);
}
var os = fs.existsSync(__dirname + '/../../AndroidManifest.xml') ? 'android' : 'ios';
package com.phonegap.plugins.twitter;
import java.util.Arrays;
import java.util.LinkedHashMap;
import java.util.Map;
import org.json.JSONArray;
import org.json.JSONException;
import android.content.ComponentName;
[self.btnCollect setTitle:@"EDIT DECK" forState:UIControlStateNormal];
[self.btnCollect addTarget:(DeckViewController *)self.parentDeckViewController action:@selector(addCardsToDeck:) forControlEvents:UIControlEventTouchUpInside];