This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.
Step 1 - Enable NBD on the Host
modprobe nbd max_part=8
/* | |
I've wrapped Makoto Matsumoto and Takuji Nishimura's code in a namespace | |
so it's better encapsulated. Now you can have multiple random number generators | |
and they won't stomp all over eachother's state. | |
If you want to use this as a substitute for Math.random(), use the random() | |
method like so: | |
var m = new MersenneTwister(); |
// node.js 0.5 Diffie-Hellman example | |
var assert = require("assert"); | |
var crypto = require("crypto"); | |
// the prime is shared by everyone | |
var server = crypto.createDiffieHellman(512); | |
var prime = server.getPrime(); | |
// sharing secret key on a pair |
struct CUserCmd: | |
0x00: vtable void * | |
0x04: command_number int | |
0x08: tick_count int | |
0x0c: viewangles QAngle | |
0x18: forwardmove float | |
0x1c: sidemove float | |
0x20: upmove float | |
0x24: buttons int | |
0x28: impulse byte |
This is way more complicated than it should be. The following conditions need to be met :
In this particular case, I'm interested in bringing in the 'default' template of jsdoc as a sub-directory in my project so I could potentially make changes to the markup it genereates while also being able to update from upstream if there are changes. Ideally their template should be a separate repo added to jsdoc via a submodule -- this way I could fork it and things would be much easier.... but, it is what it is.
After much struggling with git, subtree and git-subtree, I ended up finding this http://archive.h2ik.co/2011/03/having-fun-with-git-subtree/ -- it basically sets up separate branches from tracking remote, the particular sub-directory, and uses git subtree contrib module to pull it all togther. Following are
//go:generate protoc --go_out=import_prefix=github.com/your_github_acct/your_repo/Godeps/_workspace/src/:. your_proto_file.proto | |
package yourprotopkg |
#Rocket League API
All requests seem to be to the domain https://psyonix-rl.appspot.com. There are several endpoints on this domain.
Endpoint | Purpose |
---|---|
/callproc105/ | Leaderboard, player statistics |
/Population/GetPopulation/ | Player counts/regions |
/login105/ | Authentication, obtaining session ids |
From an appropriate location:
mkdir replica-set
mkdir -p replica-set/rs0-0 replica-set/rs0-1
mongod --port 27018 --dbpath replica-set/rs0-0 --replSet rs0 --smallfiles --oplogSize 128 &
mongod --port 27019 --dbpath replica-set/rs0-1 --replSet rs0 --smallfiles --oplogSize 128 &
mongo localhost:27018
So the basic thing you need to start working with org-mode is to install org-mode. Emacs > 24.??? already have it bundled and if you're not going to use some cool features like org-drill and stuff, that should be enough.
Basically, org-mode operates with org files. Create one (work.org
for example). Org files' markup is simple -- there are headers
with info. Header format is '*'{1..} TODO-kw Description
. To
create entry just write it. Also C-c RET
does something similar
(I never use it tho). So, stars are indentation -- more indented
#!/bin/bash | |
URL='https://web-api.nordvpn.com/v1/ips/info' | |
JSON=$(curl -s $URL) | |
printf "\n" | |
#echo $JSON | python -m json.tool | |
echo $JSON | python -c 'import sys, json; data = json.load(sys.stdin); print("IP: %s (%s)\nStatus: %s" % (data["ip"], data["isp"], "\033[32mProtected" if data["protected"] is True else "\033[31mUnprotected"));' | |
printf "\n" |