# Resize the file system in UI, under VM -> Hardware -> Click on the disk to resize, click "Resize disk" button
# Confirm increase in disk space (1TB in my case)
$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1T 0 disk
├─sda1 8:1 0 1M 0 part
├─sda2 8:2 0 1G 0 part /boot
└─sda3 8:3 0 1T 0 part
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 functions = require('firebase-functions'); | |
const TelegramBot = require('node-telegram-bot-api'); | |
const token = "***" | |
const chatID = 1024 // your telegram id, you must first send a message to your bot | |
exports.notifyIAP = functions.analytics.event('in_app_purchase').onLog((event) => { | |
const purchaseValue = event.valueInUSD; | |
if (purchaseValue > 0) { | |
const bot = new TelegramBot(token, {polling: false}); |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
"""Edge Microsoft TTS for Python.""" | |
import sys | |
from ws4py.client.threadedclient import WebSocketClient | |
import binascii | |
import argparse | |
import json | |
import requests | |
import re |
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
#!/usr/bin/env python | |
# -*- coding:utf-8 -*- | |
import sys | |
reload(sys) | |
sys.setdefaultencoding('utf-8') | |
from ws4py.client.threadedclient import WebSocketClient | |
import binascii | |
class WSClient(WebSocketClient): | |
def __init__(self, url, text, filename): |
Route all traffic with a raspberry pi like a VPN.
- get raspbian up and running https://www.raspberrypi.org/downloads/raspbian/
- turn on ssh https://www.raspberrypi.org/documentation/remote-access/ssh/README.md
- maybe update your packages
-
CTRL + A
— Move to the beginning of the line -
CTRL + E
— Move to the end of the line -
CTRL + [left arrow]
— Move one word backward (on some systems this is ALT + B) -
CTRL + [right arrow]
— Move one word forward (on some systems this is ALT + F) -
CTRL + U
— (bash) Clear the characters on the line before the current cursor position -
CTRL + U
—(zsh) If you're using the zsh, this will clear the entire line -
CTRL + K
— Clear the characters on the line after the current cursor position -
ESC + [backspace]
— Delete the word in front of the cursor
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
#!/usr/bin/python | |
# We send candy shipments in batches in 2 week intervals. Each list here shows which customers received | |
# each batch, starting from Nov 28th 2015. When a number goes missing, it means that the customer canceled | |
# their subscription. When a number appears, it means that a new customer joined. | |
shipping_lists = [ | |
[1, 2, 4, 5, 6, 7, 8, 9, 10, 11, 12, 14, 15, 16, 18, 19, 21, 22, 24, 26, 27, 30, 31, 33, 34, 36, 37, 40, 42, 45, 46, 49, 50, 51, 52, 56, 57, 58, 59, 61, 64, 66, 67, 68, 70, 71, 72, 73, 75, 76, 77, 80, 81, 82, 83, 84, 85, 86, 88, 89, 93, 94, 95, 96, 98, 99, 101, 103, 104, 105, 106, 109, 110, 111, 112, 118, 122, 124, 125, 127, 129, 130, 131, 132, 134, 135, 137, 140, 141, 142, 143, 145, 146, 149, 150, 152, 153, 154, 156, 158, 160, 163, 164, 166, 167, 168, 169, 170, 171, 173, 175, 177, 179, 180, 182, 184, 187, 188, 189, 190, 191, 192, 193, 196, 197, 198, 200, 201, 203, 205, 206, 207, 208, 209, 210, 211, 213, 215, 216, 218, 219, 220, 223, 224, 225, 226, 227, 228, 229, 230, 232, 236, 237, |
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 NS_DESIGNATED_INITIALIZER | |
#if __has_attribute(objc_designated_initializer) | |
#define NS_DESIGNATED_INITIALIZER __attribute((objc_designated_initializer)) | |
#else | |
#define NS_DESIGNATED_INITIALIZER | |
#endif | |
#endif |
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
defaults write com.apple.SpeechRecognitionCore AllowAudioDucking -bool NO | |
defaults write com.apple.speech.recognition.AppleSpeechRecognition.prefs DictationIMAllowAudioDucking -bool NO |
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
/** | |
Provides the ability to verify key paths at compile time. | |
If "keyPath" does not exist, a compile-time error will be generated. | |
Example: | |
// Verifies "isFinished" exists on "operation". | |
NSString *key = SQKeyPath(operation, isFinished); | |
// Verifies "isFinished" exists on self. |
NewerOlder