Skip to content

Instantly share code, notes, and snippets.

View NorikDavtian's full-sized avatar
🚢
Shipping

Norik Davtian NorikDavtian

🚢
Shipping
View GitHub Profile
/ # echo $0
/bin/sh
/ # exit
package main
import (
"fmt"
"log"
"net/http"
"os"
)
func handler(w http.ResponseWriter, r *http.Request) {
kubectl get all -A
kubectl delete all --all --all-namespaces

UID generation from EPOCH

SELECT UNIX_TIMESTAMP() * 1e3 + 1;
+--------------------------+
|UNIX_TIMESTAMP() * 1e3 + 1|
+--------------------------+
DELIMITER $$
CREATE PROCEDURE LOADGEN(SIZE INT)
DETERMINISTIC
READS SQL DATA
BEGIN
DECLARE i INT unsigned DEFAULT 1;
WHILE (i <= SIZE)
DO
INSERT INTO ping(name) VALUES ('ping');
INSERT INTO ping(name) VALUES ('pong');
kubectl config set-context dev-342

➜ /etc mysql --help | grep "Default options" -A 1

Default options are read from the following files in the given order: /etc/my.cnf /etc/mysql/my.cnf /usr/local/etc/my.cnf ~/.my.cnf

@NorikDavtian
NorikDavtian / .gitignore
Created July 24, 2020 08:21 — forked from pdxjohnny/.gitignore
Setting Up k3s for Serverless (knative) on a $5 DigitalOcean Droplet Using k3d
.terraform/
*.pem
*.tf
*.tfstate
*.yaml
*.backup
istio-*/
cert-manager-*/
*.swp
env
let obj = {
"name": "john",
"Age": "21",
"sex": "male",
"place": {"state": "ca"},
"cats": [{"name": "toby"}, {"name": "wiskers"}]
};
let capitalize = (s) => {
if (typeof s !== 'string') return '';
package main
import (
"database/sql"
"strconv"
"log"
"net/http"
"fmt"
"bytes"
"gopkg.in/gin-gonic/gin.v1"