To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
- Homebrew
- Mountain Lion -> High Sierra
#include <stdio.h> | |
#include <uv.h> | |
static void on_close(uv_handle_t* handle); | |
static void on_connect(uv_connect_t* req, int status); | |
static void on_write(uv_write_t* req, int status); | |
static uv_loop_t *loop; | |
static uv_buf_t alloc_cb(uv_handle_t* handle, size_t size) { |
# compile | |
$ g++ zlib-example.cpp -lz -o zlib-example | |
# run | |
$ ./zlib-example | |
Uncompressed size is: 36 | |
Uncompressed string is: Hello Hello Hello Hello Hello Hello! | |
---------- |
#include <uv.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
/** | |
* Our tcp server object. | |
*/ | |
uv_tcp_t server; | |
/** |
// Run in the JavaScript console of the hterm browser window | |
// Clear all existing settings - you probably don't want to do this. | |
// Preferences are now stored in "chrome.storage.sync" instead of | |
// "window.localStorage" so if you clear your preferences the changes | |
// will be propagated to other devices. | |
//term_.prefs_.storage.clear(); | |
var htermProfiles = [ |
To setup your computer to work with *.test domains, e.g. project.test, awesome.test and so on, without having to add to your hosts file each time.
package main | |
import( | |
"log" | |
"net/url" | |
"net/http" | |
"net/http/httputil" | |
) | |
func main() { |
// First: go get github.com/golang/glog | |
// Then : go test -v -vmodule=*=3 -logtostderr netgrace_test.go | |
// This test package shows how to gracefully shutdown a net.Listener. | |
package netgrace | |
import ( | |
"bufio" | |
"fmt" | |
"github.com/golang/glog" |
" Don't try to be vi compatible | |
set nocompatible | |
" Helps force plugins to load correctly when it is turned back on below | |
filetype off | |
" TODO: Load plugins here (pathogen or vundle) | |
" Turn on syntax highlighting | |
syntax on |
package main | |
import ( | |
r "github.com/dancannon/gorethink" | |
"log" | |
"time" | |
) | |
func main() { | |
log.Println("BEGIN") |
You might want to read this to get an introduction to armel vs armhf.
If the below is too much, you can try Ubuntu-ARMv7-Qemu but note it contains non-free blobs.
First, cross-compile user programs with GCC-ARM toolchain. Then install qemu-arm-static
so that you can run ARM executables directly on linux