Simple Angular App Example, Disconnected and Mocked inline html and javascript
simply clone the repo locally and
git clone https://gist.github.com/6755421.git AngularStandalone
cd AngularStandalone
open index.html| #!/bin/sh | |
| (( ${#} > 0 )) || { | |
| echo 'The uninstaller is now trying to remove StrongLoop Suite' | |
| echo 'Press Control-C to quit or Enter to continue the script with sudo: ' | |
| read | |
| echo 'Re-running the script with sudo.' | |
| echo 'You may be prompted for a password for the sudo command.' | |
| sudo ${0} sudo | |
| exit $? | |
| } |
| // 1. Go to page https://www.linkedin.com/settings/email-frequency | |
| // 2. You may need to login | |
| // 3. Open JS console | |
| // ([How to?](http://webmasters.stackexchange.com/questions/8525/how-to-open-the-javascript-console-in-different-browsers)) | |
| // 4. Copy the following code in and execute | |
| // 5. No more emails | |
| // | |
| // Bookmarklet version: | |
| // http://chengyin.github.io/linkedin-unsubscribed/ |
Simple Angular App Example, Disconnected and Mocked inline html and javascript
simply clone the repo locally and
git clone https://gist.github.com/6755421.git AngularStandalone
cd AngularStandalone
open index.html| // Custom swipe detection for table rows (since technically the "swipe" | |
| // event doesn't apply to individual rows but rather the table. This way we | |
| // don't have to assign a swipe event for each row. One event to manage | |
| // them all is more performant. | |
| var TOUCH_X = 0; | |
| $.list.addEventListener("touchstart", function(e) { | |
| TOUCH_X = e.x; | |
| }); | |
| $.list.addEventListener("touchend", function(e) { | |
| if(e.x > (TOUCH_X + 44)) { |
| function OnSubmit(e){ | |
| var NewSubmission = {}; | |
| var Properties = ["Timestamp","Favourite Colour","Explanation"]; | |
| var i = 0; | |
| for(i = 0; i < Properties.length; i++){ | |
| NewSubmission[Properties[i]] = e.values[i]; | |
| } |
Locate the section for your github remote in the .git/config file. It looks like this:
[remote "origin"]
fetch = +refs/heads/*:refs/remotes/origin/*
url = [email protected]:joyent/node.git
Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:
| /* | |
| * Android API Guide | |
| * http://developer.android.com/guide/topics/ui/actionbar.html | |
| * Android Design Guide | |
| * http://developer.android.com/design/patterns/actionbar.html | |
| * Titanium Mobile will support someday | |
| * https://jira.appcelerator.org/browse/TIMOB-2371 | |
| */ | |
| var osName = Ti.Platform.osname, | |
| isAndroid = osName==='android', |
| #!/bin/bash | |
| ##### | |
| # | |
| # This script creates android emulators on the fly. | |
| # | |
| # Please refer to the README for usage instructions. | |
| # | |
| #### |
| /** | |
| * The following snippet will ask the user to rate your app the second time they launch it. | |
| * It lets the user rate it now, "Remind Me Later" or never rate the app. | |
| */ | |
| var win = Ti.UI.createWindow({ backgroundColor: '#fff' }); | |
| win.addEventListener('open', checkReminderToRate); | |
| win.add(Ti.UI.createLabel({ text: 'This is a simple app that will remind you to rate it.' })); | |
| win.open(); | |
| function checkReminderToRate() { |
| function onOpen() { | |
| var menuEntries = [ {name: "Create Diary Doc from Sheet", functionName: "createDocFromSheet"}]; | |
| var ss = SpreadsheetApp.getActiveSpreadsheet(); | |
| ss.addMenu("Fitness Diaries", menuEntries); | |
| } | |
| function createDocFromSheet(){ | |
| var templateid = "1O4afl8SZmMxMFpAiN16VZIddJDaFdeRBbFyBtJvepwM"; // get template file id | |
| var FOLDER_NAME = "Fitness Diaries"; // folder name of where to put completed diaries | |
| // get the data from an individual user |