Skip to content

Instantly share code, notes, and snippets.

View sosso's full-sized avatar

Anthony Sosso sosso

  • RealScout
  • Los Angeles, CA
View GitHub Profile
@sosso
sosso / postgres-cheatsheet.md
Created June 21, 2019 23:33 — forked from Kartones/postgres-cheatsheet.md
PostgreSQL command line cheatsheet

PSQL

Magic words:

psql -U postgres

Some interesting flags (to see all, use -h or --help depending on your psql version):

  • -E: will describe the underlaying queries of the \ commands (cool for learning!)
  • -l: psql will list all databases and then exit (useful if the user you connect with doesn't has a default database, like at AWS RDS)
@sosso
sosso / Gulpfile.js
Last active August 29, 2015 14:15 — forked from laracasts/Gulpfile.js
/*
beforehand, run these via cli:
npm install gulp -g
run this from the same directory where you'll be writing your tests
npm install gulp gulp-phpspec gulp-run gulp-notify gulp-run --save-dev
To set up autowatch, do `gulp watch` from the command line.
*/
var gulp = require('gulp');
<android xmlns:android="http://schemas.android.com/apk/res/android">
<uses-permission android:name="android.permission.WAKE_LOCK"></uses-permission>
<uses-permission android:name="android.permission.INTERNET"></uses-permission>
<uses-permission android:name="android.permission.ACCESS_WIFI_STATE"></uses-permission>
<activity android:name="com.keyes.youtube.OpenYouTubePlayerActivity"></activity>
</android>
var intent = Ti.Android.createIntent({
action: 'null',
data: 'ytv://'+vguid,
packageName: 'com.keyes.youtube',
className: 'com.keyes.youtube.OpenYouTubeActivity'
});
Ti.Android.Activity.startActivity(intent);
Intent lVideoIntent = new Intent(null, Uri.parse("ytpl://"+YOUTUBE_PLAYLIST_ID), this, OpenYouTubeActivity.class);//public Intent (String action, Uri uri, Context packageContext, Class<?> cls) from Android doc
startActivity(lVideoIntent);