Alias for .bashrc or .zshrc:
sh alias nano="LC_ALL=en_US.UTF-8 nano --smarthome --autoindent --linenumbers --mouse --historylog --trimblanks --backupdir=$HOME/.backup --rcfile=$HOME/.config/nano/config --nohelp --tempfile"
// Simple C benchmark | |
#include <stdio.h> | |
#include <time.h> | |
inline int parse_bin_digit(const int ch) | |
{ | |
switch (ch) { | |
case '0': | |
return 0; |
package main | |
// | |
// Example program for checking errors when adding users. | |
// | |
// HOWEVER it might be better to instead check that the values are as expected | |
// in the Redis database AFTER adding them. | |
// | |
import ( |
Alias for .bashrc or .zshrc:
sh alias nano="LC_ALL=en_US.UTF-8 nano --smarthome --autoindent --linenumbers --mouse --historylog --trimblanks --backupdir=$HOME/.backup --rcfile=$HOME/.config/nano/config --nohelp --tempfile"
package main | |
import ( | |
"fmt" | |
"github.com/coreos/bbolt" | |
"github.com/xyproto/permissionbolt" | |
"github.com/xyproto/simplebolt" | |
"log" | |
"os" | |
"path" |
#include <stdio.h> | |
#include <string.h> | |
#include <stdlib.h> | |
extern char* go_add(char*, char*) __asm__ ("example.main.Add"); | |
char* __go_string_plus(char *a, char *b) { | |
char *c = malloc((strlen(a) + strlen(b) + 1)); | |
strcat(c, a); | |
strcat(c, b); |
RELEASE ?= 0 | |
%: %.in | |
@$(eval SHEBANG=$(shell head -1 ${<} | grep -q -F '#!' && echo 1 || echo 0)) | |
@if [ $(SHEBANG) = 1 ]; then \ | |
head -1 $< > $@; \ | |
tail -n +2 $< | sed -e 's/^ *# .*$$//' -e '/^$$/d' -e '/^#$$/d' | cpp -DRELEASE=$(RELEASE) -P >> $@; \ | |
else \ | |
sed -e 's/^ *# .*$$//' -e '/^$$/d' -e '/^#$$/d' $< | cpp -DRELEASE=$(RELEASE) -P > $@; \ | |
fi |
#!/bin/bash | |
# Try to extract the latest tag's commit hash | |
git ls-remote --tags $(grep source= PKGBUILD | cut -d\" -f2 | cut -d\# -f1 | cut -d+ -f2 | sed "s/\$pkgname/$(grep pkgname= PKGBUILD | cut -d= -f2)/g") | tail -1 |
package main | |
import ( | |
"fmt" | |
"github.com/xyproto/permissionwrench" | |
"github.com/xyproto/simplehstore" | |
) | |
func main() { | |
perm, err := permissionwrench.New() |
#!/bin/sh | |
git clone https://github.com/robertkrimen/otto | |
cd otto/otto; go get -d; go build; cd ../.. | |
git clone https://github.com/tc39/test262.git | |
git clone https://github.com/test262-utils/test262-harness-py.git | |
python2 test262-harness-py/src/test262.py --command otto/otto/otto --tests test262 > original.log | |
rm -rf otto | |
git clone https://github.com/xyproto/otto.git | |
cd otto/otto; go get -d; go build; cd ../.. | |
python2 test262-harness-py/src/test262.py --command otto/otto/otto --tests test262 > xyproto.log |