64 bit | 32 bit | 16 bit | 8 bit | |
---|---|---|---|---|
A (accumulator) | RAX |
EAX |
AX |
AL |
B (base, addressing) | RBX |
EBX |
BX |
BL |
C (counter, iterations) | RCX |
ECX |
CX |
CL |
D (data) | RDX |
EDX |
DX |
DL |
/* equation boxes */ | |
#include <stdarg.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include "eqn.h" | |
struct box *box_alloc(int szreg, int pre, int style) | |
{ | |
struct box *box = malloc(sizeof(*box)); |
sudo apt-get install libgmp-dev libmpfr-dev libmpc-dev g++-multilib mercurial texinfo | |
hg clone http://hg.openjdk.java.net/jdk8u/jdk8u | |
cd jdk8u | |
hg update jdk8u92-b14 | |
sed -ri 's/subrepos="[^"]+"/subrepos="hotspot"/' ./make/scripts/hgforest.sh # only get hotspot | |
sed -ri 's/subrepos="[^"]+"/subrepos="hotspot"/' ./common/bin/hgforest.sh # only get hotspot | |
chmod +x ./get_source.sh; ./get_source.sh | |
cd hotspot/src/share/tools/hsdis | |
wget http://ftp.heanet.ie/mirrors/ftp.gnu.org/gnu/binutils/binutils-2.29.tar.gz | |
tar -xzf binutils-2.29.tar.gz |
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
window.sendString = function (str) { | |
f(str.split("")); | |
function f(t) { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = character.match(/[A-Z!@#$%^&*()_+{}:\"<>?~|]/); |
Suppose you have weird taste and you absolutely want:
- your visual selection to always have a green background and black foreground,
- your active statusline to always have a white background and red foreground,
- your very own deep blue background.
#!/usr/bin/env bash | |
# groff-install-ttf converts a TrueType (ttf) or OpenType (otf) font to a | |
# Printer Font ASCII (pfa) font and a groff font (ditroff) and installs them to | |
# groff's site-font directory. | |
# | |
# Requires fontforge. | |
# | |
# You're the best, Peter Schaffter, but contrary to the verbose and | |
# difficult-to-follow http://www.schaffter.ca/mom/momdoc/appendices.html#fonts, | |
# the t42 file doesn't seem to be necessary, at least with recent versions of |
apk info | xargs -n1 -I{} apk info -s {} | xargs -n4 | awk '{print $4,$1}' | sort -rn |
// Convert a struct sockaddr address to a string, IPv4 and IPv6: | |
char *get_ip_str(const struct sockaddr *sa, char *s, size_t maxlen) | |
{ | |
switch(sa->sa_family) { | |
case AF_INET: | |
inet_ntop(AF_INET, &(((struct sockaddr_in *)sa)->sin_addr), | |
s, maxlen); | |
break; |
More details - http://blog.gbaman.info/?p=791
For this method, alongside your Pi Zero, MicroUSB cable and MicroSD card, only an additional computer is required, which can be running Windows (with Bonjour, iTunes or Quicktime installed), Mac OS or Linux (with Avahi Daemon installed, for example Ubuntu has it built in).
1. Flash Raspbian Jessie full or Raspbian Jessie Lite onto the SD card.
2. Once Raspbian is flashed, open up the boot partition (in Windows Explorer, Finder etc) and add to the bottom of the config.txt
file dtoverlay=dwc2
on a new line, then save the file.
3. If using a recent release of Jessie (Dec 2016 onwards), then create a new file simply called ssh
in the SD card as well. By default SSH i