Skip to content

Instantly share code, notes, and snippets.

<?php
require_once("src/Google/Client.php");
require_once("src/Google/Service/Storage.php");
/**
* Connect to Google Cloud Storage API
*/
$client = new Google_Client();
$client->setApplicationName("App Name");
String packageName = "com.android.browser";
String className = "com.android.browser.BrowserActivity";
Intent intent = new Intent(Intent.ACTION_VIEW);
intent.addCategory(Intent.CATEGORY_LAUNCHER);
intent.setClassName(packageName, className);
intent.setData(Uri.parse("https://google.com"));
startActivity(intent);
http://rootzwiki.com/topic/41985-enable-wifi-tether-through-adb/
adb shell input keyevent 3 # home
adb shell am start -a android.intent.action.MAIN -n com.android.settings/.Settings
adb shell input keyevent 20 # down
adb shell input keyevent 20 # down
@x011
x011 / tws_prevent_logout.au3
Last active March 12, 2017 19:46
Prevents TWS (Interactive Brokers) Automatic Logout
#include <Debug.au3>
#include <date.au3>
Opt("MouseCoordMode", 0)
Opt("WinTitleMatchMode", 3)
While 1
import csv
import sqlite3
import os.path
from datetime import datetime
csv_file = "csv_to_db.csv"
db_file = "csv_to_db.sqlite"
if not os.path.exists(db_file):
#id,mtype,competition,gender,team1,team2,venue,date
con = sqlite3.Connection(db_file,detect_types=sqlite3.PARSE_DECLTYPES)
cur = con.cursor()
@x011
x011 / ed_langs_pt.json
Created October 20, 2017 23:37
EtherDelta Translation to Portuguese
{
"en": {
"en": "English",
"cn": "English",
"fr": "English",
"es": "English",
"ko": "English",
"pt": "English"
},
"cn": {
@x011
x011 / LetsEncrypt.md
Created February 21, 2018 10:35 — forked from davestevens/LetsEncrypt.md
Let’s Encrypt setup for Apache, NGINX & Node.js

Let's Encrypt

Examples of getting certificates from Let's Encrypt working on Apache, NGINX and Node.js servers.

Obtain certificates

I chose to use the manual method, you have to make a file available to verify you own the domain. Follow the commands from running

git clone https://github.com/letsencrypt/letsencrypt
cd letsencrypt
@x011
x011 / .block
Created May 7, 2018 02:58 — forked from mbostock/.block
GeoJSON in Three.js
license: gpl-3.0
height: 960
border: no
# Make sure less secure apps access is enabled on your gmail account.
# https://support.google.com/accounts/answer/6010255?hl=en
def gmail_checker(username,password):
import imaplib
i=imaplib.IMAP4_SSL('imap.gmail.com')
try:
i.login(username,password)
if i.welcome and "OK Gimap" in i.welcome :
return True