Installing packages.
opkg update
opkg install kmod-i2c-gpio-custom i2c-tools
Loading I2C bus drivers. Using pins 7 (SDA) and 8 (SCL).
insmod i2c-dev
insmod i2c-gpio-custom bus0=0,7,8
Function.prototype.inheritsFrom = function( parentClassOrObject ){ | |
if ( parentClassOrObject.constructor == Function ) | |
{ | |
//Normal Inheritance | |
this.prototype = new parentClassOrObject; | |
this.prototype.constructor = this; | |
this.prototype.parent = parentClassOrObject.prototype; | |
} | |
else | |
{ |
echo "\nUpdating system packages..." | |
apt-get -qq update | |
echo "\nInstalling main dependencies..." | |
apt-get install --quiet --assume-yes git curl build-essential python-setuptools python-dev sshpass | |
echo "\nInstalling pip..." | |
apt-get install python-pip | |
echo "\nInstalling ansible" | |
pip install ansible |
Since Boot2docker 1.3.1, just need to set DOCKER_TLS=no at VM side. | |
$ boot2docker ssh -t 'sudo vi /var/lib/boot2docker/profile' |
# add the docker group if it doesn't already exist. | |
sudo groupadd docker | |
# Add the connected user to the docker group. | |
sudo gpasswd -a ${USER} docker | |
# Restart the Docker daemon | |
sudo service docker restart | |
# Activate the changes on groups | |
newgrp docker |
var cursor = db.<collection>.find(); | |
while (cursor.hasNext()) { | |
var doc = cursor.next(); | |
db.<collection>.update({_id : doc._id}, { $set : { <field>: new Date(doc.<field>)} }) | |
} |
[all] | |
127.0.0.1 | |
[all:vars] | |
project_root = /vagrant | |
upstart_criteria = vagrant-mounted | |
project_url = localhost | |
ansible_sudo = true | |
ansible_ssh_user = vagrant | |
ansible_ssh_port = 2222 |
#!/bin/sh /etc/rc.common | |
# Yota 4G Internet keep alive script | |
START=10 | |
STOP=15 | |
start() { | |
echo 'starting' | |
ping www.ru | |
while [ $? -ne 0 ]; do |
Installing packages.
opkg update
opkg install kmod-i2c-gpio-custom i2c-tools
Loading I2C bus drivers. Using pins 7 (SDA) and 8 (SCL).
insmod i2c-dev
insmod i2c-gpio-custom bus0=0,7,8
define([ | |
'ractive', | |
'module'], | |
function(Ractive, module) { | |
return Ractive.extend({ | |
template: '{{# isLoaded }}<innerComponent />{{/ isLoaded }}', | |
components: { | |
innerComponent: function() { |
#!/bin/bash | |
# Docker version >= 1.9 | |
echo "Cleaning up exited containers..." | |
docker ps -a -qf status=exited | xargs -r docker rm | |
echo "Cleaning up orphanted images..." | |
docker images -qf dangling=true | xargs -r docker rmi | |
echo "Cleaning up orphanted volumes..." | |
docker volume ls -qf dangling=true | xargs -r docker volume rm |