country=CH
ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1
network={
ssid="yourSSID"
psk="yourWifiPassword"
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
<style> | |
.gist {max-width:100%; overflow:auto} | |
</style> |
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
public class LogEntry { | |
private LogKey key; | |
private String value; | |
public LogEntry(LogKey key, String value) { | |
this.key = key; | |
this.value = value; | |
} |
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
#!/bin/bash | |
set -e | |
# Any real application probably has a more elaborate deployment process. Here I | |
# simply hardcoded my example function name; the first thing to change would be | |
# to load this from a configuration file or similar source instead. | |
PROJ=jso-camp | |
REGION=europe-west1 |
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 mysql = require('mysql'); | |
const config = require('./config')['production']; | |
const pool = mysql.createPool({ | |
connectionLimit: 1, | |
socketPath: '/cloudsql/' + config.database.connection, | |
user: config.database.user, | |
password: config.database.password, | |
database: config.database.name | |
}); |
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 router = require('gcf-api-router')(); | |
router.route('/result') | |
.get(getAllResults) //GET api/result | |
.post(storeResult); //POST api/result | |
router.route('/result/:id') | |
.get(getSpecificResult); //GET api/result/[id] | |
function getAllResults(req, res) { |
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 config = { | |
sample: { | |
database: { | |
connection: 'projectId:location:dbInstance', | |
name: 'dbName', | |
user: 'dbUser', | |
password: 'dbPassword' | |
} | |
} | |
}; |
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
# 1. Install gfc emulator | |
npm install -g @google-cloud/functions-emulator | |
# 2. Set correct project | |
functions config set projectId YOUR_PROJECT_ID | |
# 3. Get correct version of Node.js (works for *nix systems) | |
npm install -g n | |
n 6.11.5 |
scp filename.txt [email protected]:/var/lib/location/on/server
scp [email protected]:/var/lib/location/on/server/filename.txt ./
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
def props = new Properties() | |
file("gradle.properties").withInputStream { props.load(it) } | |
int major | |
int minor | |
int hotfix | |
task readVersion() { | |
doFirst { | |
String version = props.getProperty("version") |