The popular open-source contract for web designers and developers by Stuff & Nonsense
- Originally published: 23rd December 2008
- Revised date: October 8th 2015
- Original post
package com.nathansizemore; | |
import org.apache.http.HttpResponse; | |
import org.apache.http.client.HttpClient; | |
import org.apache.http.client.methods.HttpGet; | |
import org.apache.http.client.methods.HttpPost; | |
import org.apache.http.entity.StringEntity; | |
import org.apache.http.impl.client.HttpClientBuilder; | |
import org.apache.http.message.BasicHeader; | |
import org.apache.http.protocol.HTTP; |
/* | |
* Service for UsbHost Communication with an Arduino Due | |
*/ | |
import java.util.Arrays; | |
import android.annotation.SuppressLint; | |
import android.app.Service; | |
import android.content.BroadcastReceiver; | |
import android.content.Context; |
# Prompt | |
export PS1="\[\033[36m\]\u\[\033[m\]@\[\033[32m\]\h:\[\033[33;1m\]\w\[\033[m\]\$ " | |
# Terminal colors | |
export CLICOLOR=1 | |
export LSCOLORS=ExFxBxDxCxegedabagacad | |
# ls | |
alias ls="ls -lGAFh" |
perl -pi -e 's/\r\n|\n|\r/\r\n/g' file-to-convert # Convert to DOS | |
perl -pi -e 's/\r\n|\n|\r/\n/g' file-to-convert # Convert to UNIX |
# Sweet branch and commit mappings | |
git config --global alias.map "log --graph --abbrev-commit --decorate --format=format:'%C(bold blue)%h%C(reset) - %C(bold cyan)%aD%C(reset) %C(bold green)(%ar)%C(reset)%C(bold yellow)%d%C(reset)%n'' %C(white)%s%C(reset) %C(dim white)- %an%C(reset)' --all" |
Latency Comparison Numbers | |
-------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns | |
Send 1K bytes over 1 Gbps network 10,000 ns 0.01 ms | |
Read 4K randomly from SSD* 150,000 ns 0.15 ms |
#! /bin/bash | |
BINUTILS_VERSION=binutils-2.28 | |
GCC_VERSION=gcc-7.1.0 | |
LIBC_VERSION=glibc-2.24 | |
MPFR_VERSION=mpfr-3.1.5 | |
GMP_VERSION=gmp-6.1.2 | |
MPC_VERSION=mpc-1.0.3 | |
ISL_VERSION=isl-0.16.1 | |
CLOOG_VERSION=cloog-0.18.1 |
// Copyright 2016 Nathan Sizemore <[email protected]> | |
// | |
// This Source Code Form is subject to the terms of the | |
// Mozilla Public License, v. 2.0. If a copy of the MPL was not distributed | |
// with this file, you can obtain one at http://mozilla.org/MPL/2.0/. | |
use std::io::{self, Error, ErrorKind, Read, Write}; | |
use std::os::unix::io::{AsRawFd, RawFd}; |
var frameData = [ | |
{ | |
"name":"Aquaman", | |
"strength":1700, | |
"ability":1600, | |
"defense":1500, | |
"hp":1050, | |
"basicAttacks":[ | |
{ | |
"name":"Flounder Fist", |