docker exec -it $(docker ps -q) bash
docker run -it ubunut bash
docker kill $(docker ps -q)
Delete all stopped containers with
var subscription Subscription | |
err := json.NewDecoder(r.Body).Decode(&subscription) | |
if err != nil { | |
http.Error(w, err.Error(), http.StatusBadRequest) | |
return | |
} | |
defer r.Body.Close() |
const http = require('http'); | |
const url = require('url'); | |
function handler(req, res) { | |
res.writeHead(200, {'Content-type':'text/plain'}); | |
res.write('Hello, I am a webserver !'); | |
res.end(); | |
} | |
const port = process.env.PORT || 8080; |
package main | |
import ( | |
"github.com/blendle/zapdriver" | |
"go.uber.org/zap" | |
) | |
func main() { | |
structuredLogger, _ := zapdriver.NewProduction() | |
defer structuredLogger.Sync() // flushes buffer, if any |
for file in *.heic; do sips -s format jpeg "$file" --out "${file%.heic}.jpg" && rm -f "$file"; done |
tell application "System Events" | |
click menu item "Archive" of menu "Message" of menu bar 1 of application process "Mail" | |
end tell |
filetype plugin indent on | |
syntax on | |
au FileType gitcommit set tw=72 | |
" scrolling in (iTerm2) | |
:set mouse=a | |
" Spellchecking in vim | |
:setlocal spell spelllang=en_us |
ha.lillesveiven.space { | |
reverse_proxy 127.0.0.1:8123 | |
} | |
oc.lillesveiven.space { | |
reverse_proxy 127.0.0.1:9123 | |
} | |
nr.lillesveiven.space { | |
reverse_proxy 127.0.0.1:1880 |
# Source https://community.home-assistant.io/t/easee-ev-charging-station/186474/7 | |
import requests, json, time | |
from pprint import pprint | |
class connect: | |
def __init__(self, | |
access_token=None, | |
): |
curl -s -L https://github.com/zyedidia/micro/releases/download/v2.0.8/micro-2.0.8-linux-arm.tar.gz | sudo tar xvz -C /usr/local/bin/ --wildcards "micro-*/micro" --strip-components=1
curl -s -L https://github.com/zyedidia/micro/releases/download/v2.0.8/micro-2.0.8-linux64.tar.gz | sudo tar xvz -C /usr/local/bin/ --wildcards "micro-*/micro" --strip-components=1