This Gist MOVED to a public repository: P2P Index
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cmdStr := "thumbnail.sh " + url | |
cmd := exec.Command("/bin/sh", "-c", cmdStr) | |
_, err := cmd.Output() | |
if err != nil { | |
println(err.Error()) | |
return | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cloud-config | |
hostname: rancher-os | |
ssh_authorized_keys: | |
- ssh-rsa REPLACE_WITH_PUBLIC_SSH_KEY | |
rancher: | |
debug: false | |
cloud_init: | |
datasources: | |
- ec2 | |
state: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[dsont@dsont-pc client]$ tree -I node_modules\|components | |
. | |
├── app.css | |
├── app.js | |
├── build | |
│ ├── app.css | |
│ ├── app.js | |
│ ├── browser-polyfill.js | |
│ └── index.html | |
├── config |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Unit] | |
Description=consul agent | |
Requires=network-online.target | |
After=network-online.target | |
[Service] | |
EnvironmentFile=-/etc/sysconfig/consul | |
Environment=GOMAXPROCS=2 | |
Restart=on-failure | |
ExecStart=/usr/local/sbin/consul agent $OPTIONS -config-dir=/etc/consul.d |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
docker run --rm -e ROOT_URL="http://localhost" \ | |
-e METEOR_EMAIL="youradmin@yourdomain.com" \ | |
-e METEOR_USER="admin" \ | |
-e METEOR_AUTH="password" \ | |
-t ongoworks/reaction |
Install the dependencies for the archiso
package:
(root): pacman -S make squashfs-tools libisoburn dosfstools patch lynx devtools git
I recommend archiso
getting them from git, there is a package in the repositories, however, at this time of writing, it will not work with the instructions below.
So, grab the most recent version from git and install it:
(user): git clone git://projects.archlinux.org/archiso.git && cd archiso
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
rm -rf build | |
mkdir -p build | |
echo "[INFO] Creating u-boot for bananapi" | |
if [ ! -d u-boot-bananapi ]; then | |
git clone https://github.com/LeMaker/u-boot-bananapi.git | |
elif [ -d u-boot-bananapi ]; then | |
( cd u-boot-bananapi && git pull ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Ask for the user password | |
# Script only works if sudo caches the password for a few minutes | |
sudo true | |
# Install kernel extra's to enable docker aufs support | |
# sudo apt-get -y install linux-image-extra-$(uname -r) | |
# Add Docker PPA and install latest version | |
# sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 36A1D7869245C8950F966E92D8576A8BA88D21E9 | |
# sudo sh -c "echo deb https://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list" |
Simple way to setup an arm chroot for building packages for your arm devices. This is an alternative to cross-compiling where you are limited to only linking against the libs in your toolchain.
You can store the chroot wherever you like. I choose to store it in a disk-image which I mount to my filesystem.