To use:
import ScrollView from 'ScrollView.jsx`;
...
render() {
return (
<ScrollView>
{aListThatScrolls}
</ScrollView>
);
To use:
import ScrollView from 'ScrollView.jsx`;
...
render() {
return (
<ScrollView>
{aListThatScrolls}
</ScrollView>
);
{ | |
"Users": ["UserA","UserB"], | |
"Groups": ["GroupA"] | |
} |
// from: <http://openmymind.net/Getting-An-Images-Type-And-Size/> | |
func getFormat(file *os.File) (string) { | |
bytes := make([]byte, 4) | |
n, _ := file.ReadAt(bytes, 0) | |
if n < 4 { return "" } | |
if bytes[0] == 0x89 && bytes[1] == 0x50 && bytes[2] == 0x4E && bytes[3] == 0x47 { return "png" } | |
if bytes[0] == 0xFF && bytes[1] == 0xD8 { return "jpg" } | |
if bytes[0] == 0x47 && bytes[1] == 0x49 && bytes[2] == 0x46 && bytes[3] == 0x38 { return "gif" } | |
if bytes[0] == 0x42 && bytes[1] == 0x4D { return "bmp" } |
package main | |
import ( | |
"bufio" | |
"crypto/md5" | |
"crypto/sha1" | |
"crypto/sha256" | |
"crypto/sha512" | |
"encoding/hex" | |
"fmt" |
package main | |
import ( | |
"encoding/base64" | |
"net/http" | |
"strings" | |
) | |
type handler func(w http.ResponseWriter, r *http.Request) |
type ( | |
// BuoyCondition contains information for an individual station. | |
BuoyCondition struct { | |
WindSpeed float64 `bson:"wind_speed_milehour"` | |
WindDirection int `bson:"wind_direction_degnorth"` | |
WindGust float64 `bson:"gust_wind_speed_milehour"` | |
} | |
// BuoyLocation contains the buoy's location. | |
BuoyLocation struct { |
#!/bin/sh | |
# Called by "git push" after it has checked the remote status, | |
# but before anything has been pushed. | |
# | |
# If this script exits with a non-zero status nothing will be pushed. | |
# | |
# Steps to install, from the root directory of your repo... | |
# 1. Copy the file into your repo at `.git/hooks/pre-push` | |
# 2. Set executable permissions, run `chmod +x .git/hooks/pre-push` |
// --- Compiling --- | |
$ wget http://download.redis.io/releases/redis-2.8.3.tar.gz | |
$ tar xzvf redis-2.8.3.tar.gz | |
$ cd redis-2.8.3 | |
$ make | |
$ make install | |
// --- or using yum --- | |
$ rpm -Uvh http://download.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm | |
$ rpm -Uvh http://rpms.famillecollet.com/enterprise/remi-release-6.rpm |
(by @andrestaltz)
If you prefer to watch video tutorials with live-coding, then check out this series I recorded with the same contents as in this article: Egghead.io - Introduction to Reactive Programming.
As configured in my dotfiles.
start new:
tmux
start new with session name: