Skip to content

Instantly share code, notes, and snippets.

Avatar

Matthias Kadenbach mattes

View GitHub Profile
View gist:90565c73072c9f07ad64ebda3ca2916c
gcloud config configurations list
gcloud config configurations activate MY_OLD_CONFIG
View gist:8af42a0939d030b0d3ef36ddf7869cb8
# https://cloud.google.com/compute/docs/disks/add-persistent-disk#resize_partitions
sudo growpart /dev/sda 1
sudo resize2fs /dev/sda
sudo resize2fs /dev/sdb
@mattes
mattes / redis.lua
Created Jan 21, 2020
delete redis keys in bulk with pattern
View redis.lua
eval "for i, name in ipairs(redis.call('KEYS', 'pattern-*')) do redis.call('DEL', name); end" 0
View gist:6c0bc186a7f013482d2b2d1c67a485ed
ws = new WebSocket("ws://localhost:8080");
ws.onopen = function(evt) {
console.log("OPEN");
}
ws.onclose = function(evt) {
console.log("CLOSE");
ws = null;
}
View gist:3674e3769240fcc3adc02f08ee115c35
Flashing binaries to serial port /dev/ttyUSB0 (app at offset 0x10000)...
esptool.py v2.5.1
Serial port /dev/ttyUSB0
Connecting........_
Chip is ESP32-PICO-D4 (revision 1)
Features: WiFi, BT, Dual Core, Embedded Flash
MAC: d8:a0:1d:40:89:c4
Uploading stub...
Running stub...
Stub running...
@mattes
mattes / README.md
Created Sep 29, 2018
ESP32 installation
View README.md
View fortune-1000-github-repos.json
This file has been truncated, but you can view the full file.
{"name":"github","url":"https://github.com/walmartlabs","timestamp":"2018-03-23T21:58:13.542Z","data":{"description":"Example source code for the Lacinia tutorial","forked from":"","forks":"4","language":"Clojure","name":"clojure-game-geek","stars":"6","updated at":"2018-03-23T17:10:33Z","url":"https://github.com/walmartlabs/clojure-game-geek"}}
{"name":"github","url":"https://github.com/walmartlabs","timestamp":"2018-03-23T21:58:13.542Z","data":{"description":"GraphQL implementation in pure Clojure","forked from":"","forks":"59","language":"Clojure","name":"lacinia","stars":"841","updated at":"2018-03-23T00:48:51Z","url":"https://github.com/walmartlabs/lacinia"}}
{"name":"github","url":"https://github.com/walmartlabs","timestamp":"2018-03-23T21:58:13.542Z","data":{"description":"","forked from":"","forks":"","language":"Clojure","name":"schematic","stars":"2","updated at":"2018-03-22T21:29:36Z","url":"https://github.com/walmartlabs/schematic"}}
View gist:aa992e3a137a78333d67da98c644f696
GRANT ALL PRIVILEGES ON ALL TABLES IN SCHEMA PUBLIC TO XXX;
GRANT ALL PRIVILEGES ON ALL SEQUENCES IN SCHEMA PUBLIC TO XXX;
ALTER DEFAULT PRIVILEGES IN SCHEMA PUBLIC GRANT ALL PRIVILEGES ON TABLES TO XXX;
ALTER DEFAULT PRIVILEGES IN SCHEMA PUBLIC GRANT ALL PRIVILEGES ON SEQUENCES TO XXX;
\du
\dp
View main.go
package test
import (
"regexp"
guuid "github.com/google/uuid"
suuid "github.com/satori/go.uuid"
)
var re = regexp.MustCompile("^[a-fA-F0-9]{8}-[a-fA-F0-9]{4}-4[a-fA-F0-9]{3}-[8|9|aA|bB][a-fA-F0-9]{3}-[a-fA-F0-9]{12}$")
You can’t perform that action at this time.