This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sdkmanager "system-images;android-19;google_apis;x86" | |
avdmanager create avd -n Emulator-Api19-Google -k "system-images;android-19;google_apis;x86" | |
# select no custom hardware profile and then run the emulator from the /tools directory within the android-sdk dir | |
./emulator -avd Emulator-Api19-Google |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
"use strict"; | |
const https = require("https"); | |
const API_TOKEN = "YOUR_GITHUB_API_TOKEN"; | |
const GITHUB_USER = "GITHUB_USERNAME"; | |
const request = (options, postBody) => { | |
return new Promise((resolve, reject) => { | |
const req = https.request(options, res => { | |
let body = ""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
case class City( | |
id: Int, | |
name: String, | |
iata: Option[String], | |
longitude: Option[Double], | |
latitude: Option[Double], | |
updatedTimestamp: Long) | |
object udfHelpers { | |
val toTimestamp = udf((date: String) => new SimpleDateFormat("yyyy-MM-dd HH:mm").parse(date).getTime) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { Writable, Readable, PassThrough } = require("stream"); | |
const { inherits } = require("util"); | |
const AWS = require("aws-sdk"); | |
const zlib = require("zlib"); | |
const https = require("https"); | |
const gzip = zlib.createGzip(); | |
const s3 = new AWS.S3(); | |
// Change the bucket name to point to an S3 bucket write-able within the IAM role assigned to your Lambda |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set KeepAlive and RunAtLoad to false | |
vi ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
# Unload plist | |
launchctl unload ~/Library/LaunchAgents/homebrew.mxcl.postgresql.plist | |
# Stop the service if needed | |
pg_ctl -D /Users/my.username/usr/local/var/postgres/ stop -m fast |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "DisplayDeviceHelper.h" | |
#include <sstream> | |
std::string ws2s(const std::wstring& s) | |
{ | |
int len; | |
int slength = (int)s.length() + 1; | |
len = WideCharToMultiByte(CP_ACP, 0, s.c_str(), slength, 0, 0, 0, 0); | |
char* buf = new char[len]; | |
WideCharToMultiByte(CP_ACP, 0, s.c_str(), slength, buf, len, 0, 0); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef CLEANUP_H | |
#define CLEANUP_H | |
#include <windows.h> | |
#include <tchar.h> | |
#include <string> | |
#include <iostream> | |
#include <conio.h> | |
#endif |