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
// Google Apps Script for counting emails by sender in batches. Stopps and resumes after 5mins of processing to avoid reaching script runtime limit. | |
// 1. Allow required permissions | |
// 2. Add gmail service to project | |
// 3. Fill <your-email> in `runProcessor` function and adjust query if needed | |
// 4. Run function `runProcessor` | |
// 5. Result will be saved in a new spreadsheet | |
// Based on ideas from https://stackoverflow.com/a/59222719/5162536 and | |
// https://medium.com/geekculture/bypassing-the-maximum-script-runtime-in-google-apps-script-e510aa9ae6da |
Writing an apt proxy conf file /etc/apt/apt.conf.d/proxy.conf
as below.
Acquire::http::Proxy "socks5h://127.0.0.1:1080";
Acquire::https::Proxy "socks5h://127.0.0.1:1080";
Acquire::socks::Proxy "socks5h://127.0.0.1:1080";
And the proxy settings will be applied the next time we run apt.
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
--- | |
esphome: | |
name: doorbell | |
platform: ESP8266 | |
board: esp01_1m | |
# WiFi connection, correct these | |
# with values for your WiFi. | |
wifi: | |
ssid: !secret wifi_ssid |
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
#Database Configuration | |
spring.datasource.url=jdbc:mariadb://localhost:3306/billboard | |
spring.datasource.username=root | |
spring.datasource.password= | |
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver | |
#Hibernate Configuration | |
# Show or not log for each sql query | |
spring.jpa.show-sql=true |
git clone https://github.com/Neilpang/acme.sh.git
cd acme.sh
./acme.sh --install
Optionally, set the home dir and/or account info (if already have one).
If was previously using LetsEncrypt's certbot, can probably get account info from
/etc/letsencrypt/accounts/acme-v01.api.letsencrypt.org/directory/*/regr.json
.
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
# read more at https://terrty.net/2014/ssl-tls-in-nginx/ | |
# latest version on https://gist.github.com/paskal/628882bee1948ef126dd/126e4d1daeb5244aacbbd847c5247c2e293f6adf | |
# security test score: https://www.ssllabs.com/ssltest/analyze.html?d=terrty.net | |
# your nginx version might not have all directives included, test this configuration before using in production against your nginx: | |
# $ nginx -c /etc/nginx/nginx.conf -t | |
server { | |
# public key, contains your public key and class 1 certificate, to create: | |
# (example for startssl) | |
# $ (cat example.com.pem & wget -O - https://www.startssl.com/certs/class1/sha2/pem/sub.class1.server.sha2.ca.pem) | tee -a /etc/nginx/ssl/domain.pem > /dev/null |
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
<?php | |
// Encoded equivalent of: | |
// {"textures":{"SKIN":{"url":"http://textures.minecraft.net/texture/56936d4f0d1b93fef775b1fbd19281b70c6f88475bb5a41bf372c12f1f8a22"}}} | |
$base64 = 'eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvNTY5MzZkNGYwZDFiOTNmZWY3NzViMWZiZDE5MjgxYjcwYzZmODg0NzViYjVhNDFiZjM3MmMxMmYxZjhhMjIifX19'; | |
// Return skin from base64 texture | |
function get_head_from_texture($base64) { | |
$texture = json_decode(base64_decode($base64), true); | |
if (is_array($texture) and isset($texture['textures'], $texture['textures']['SKIN'], $texture['textures']['SKIN']['url'])) { |
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
// Based on java example: http://docs.oracle.com/javase/tutorial/networking/urls/readingWriting.html | |
// save as: URLConnectionReader.java | |
// compile using JDK: javac URLConnectionReader.java | |
// run: java URLConnectionReader | |
// good path: returns HTML | |
// bad path: throws an exception | |
import java.net.*; | |
import java.io.*; |
Submit card and merchant information to https://mpi.3dsecure.io
(MPI) according to:
The response will include:
NewerOlder