Skip to content

Instantly share code, notes, and snippets.

View odbol's full-sized avatar

Tyler Freeman odbol

View GitHub Profile
@karlseguin
karlseguin / gist:1876859
Created February 21, 2012 14:37
sublime text 2 script to save to remove server
#variation of http://urbangiraffe.com/2011/08/13/remote-editing-with-sublime-text-2/ that adds creating new folders remotely.
import sublime_plugin, os
class RemoteEdit(sublime_plugin.EventListener):
def on_post_save(self, view):
remote = { "/Users/leto/work/project": ["/usr/bin/scp", None, "user@server", "root_remote_path_like ~/project/", None] }
for dirname, target in remote.iteritems():
if view.file_name().startswith( dirname ):
@TomTasche
TomTasche / AndroidManifest.xml
Last active May 11, 2023 20:00
OAuth flow using the AccountManager on Android
<!-- ... -->
<uses-permission android:name="android.permission.GET_ACCOUNTS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.USE_CREDENTIALS" />
<!-- ... -->
anonymous
anonymous / untrusted-lvl12-solution.js
Created July 6, 2014 01:35
Solution to level 12 in Untrusted: http://alex.nisnevich.com/untrusted/
/*
* robotNav.js
*
* The green key is located in a slightly more
* complicated room. You'll need to get the robot
* past these obstacles.
*/
function startLevel(map) {
// Hint: you can press R or 5 to "rest" and not move the
@richjava
richjava / gradle-assemberelease-in-android-studio
Last active December 2, 2020 01:43
Gradle assembleRelease in Android Studio
For setup of Gradle:
1. Set gradle home in env variables, i.e. GRADLE_HOME C:\gradle-[version-number-goes-here]
2. Put Gradle bin in PATH env variable (append it to the end with';' before it): i.e. ;C:\gradle-1.12\bin
3. Add Android SDK to System Variables.
For release:
@eurycea
eurycea / Something.java
Last active February 8, 2021 06:31
Android Build Config Field from command line
...
if(BuildConfig.DEVELOPER_MODE){
doDeveloperModeThing();
}
...
// http://www.iquilezles.org/www/articles/palettes/palettes.htm
// to see this function graphed out go to: https://www.desmos.com/calculator/18rq4ybrru
vec3 cosPalette( float t , vec3 brightness, vec3 contrast, vec3 osc, vec3 phase)
{
return brightness + contrast*cos( 6.28318*(osc*t+phase) );
}
vec3 hsb2rgb(vec3 c)
{