This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
/* Basic example of saving cookie using axios in node.js and session's recreation after expiration. | |
* We have to getting/saving cookie manually because WithCredential axios param use XHR and doesn't work in node.js | |
* Also, this example supports parallel request and send only one create session request. | |
* */ | |
const BASE_URL = "https://google.com"; | |
// Init instance of axios which works with BASE_URL | |
const axiosInstance = axios.create({ baseURL: BASE_URL }); |
This guide has moved to a GitHub repository to enable collaboration and community input via pull-requests.
https://github.com/alexellis/k8s-on-raspbian
Alex
#!/bin/bash | |
function get_clipboard_content { | |
xclip -selection c -o | |
} | |
function upload_pastie { | |
local lang="plain_text" | |
local content=$(get_clipboard_content) | |
local private=1 |
Article: http://mikegerwitz.com/papers/git-horror-story
faking other user's commits is easy with --author flag
$ git commit --author='Foo Bar <foo@bar.com>' -m 'some commit'
signing commits ensures:
I really commited all the commits I sign
package us.brtm.cfg; | |
import org.objectweb.asm.tree.AbstractInsnNode; | |
import org.objectweb.asm.tree.LabelNode; | |
import org.objectweb.asm.tree.MethodNode; | |
import org.objectweb.asm.tree.analysis.*; | |
import us.brtm.cfg.generic.Node; | |
/** | |
* @author Pedro Daia Cardoso |
import time | |
import socket | |
def collect_metric(name, value, timestamp): | |
sock = socket.socket() | |
sock.connect( ("localhost", 2003) ) | |
sock.send("%s %d %d\n" % (name, value, timestamp)) | |
sock.close() | |
def now(): | |
return int(time.time()) |