Skip to content

Instantly share code, notes, and snippets.

View gyaresu's full-sized avatar

Gareth gyaresu

View GitHub Profile
@gyaresu
gyaresu / logs
Created June 13, 2015 08:52
docker logs -f 6b8651dc71f0
⇒ docker logs -f 6b8651dc71f0
/usr/lib/python2.7/dist-packages/supervisor/options.py:295: UserWarning: Supervisord is running as root and it is searching for its configuration file in default locations (including its current working directory); you probably want to specify a "-c" argument specifying an absolute path to a configuration file for improved security.
'Supervisord is running as root and it is searching '
2015-06-13 08:42:26,231 CRIT Supervisor running as root (no user in config file)
2015-06-13 08:42:26,231 WARN Included extra file "/etc/supervisor/conf.d/supervisord.conf" during parsing
2015-06-13 08:42:26,260 INFO RPC interface 'supervisor' initialized
2015-06-13 08:42:26,260 CRIT Server 'unix_http_server' running without any HTTP authentication checking
2015-06-13 08:42:26,260 INFO supervisord started with pid 1
2015-06-13 08:42:27,266 INFO spawned: 'nginx' with pid 8
2015-06-13 08:42:27,267 INFO spawned: 'hhvm-fastcgi' with pid 9
@gyaresu
gyaresu / docker-ps
Created June 13, 2015 08:53
docker ps -a
⇒ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
6b8651dc71f0 phpstack_front:latest "/usr/bin/supervisor 8 minutes ago Up 8 minutes 0.0.0.0:80->80/tcp, 0.0.0.0:9000->9000/tcp phpstack_front_1
608a2a5aa3b1 tutum/redis:latest "/run.sh" 8 minutes ago Up 8 minutes 0.0.0.0:6379->6379/tcp phpstack_redis_1
d89afe7cc679 tutum/mongodb:latest "/run.sh" 8 minutes ago Up 8 minutes 0.0.0.0:27017->27017/tcp, 0.0.0.0:28017->28017/tcp phpstack_mongodb_1
0d41489a5a5a tutum/mysql:latest "/run.sh" 8 minutes ago Up 8 minutes 0.0.0.0:3306->3306/tcp phpstack_mysql_1
680e2f60aed2 tutum/elasticsearch:latest "/run.sh"
@gyaresu
gyaresu / php5-fpm
Created June 13, 2015 08:56
php5-fpm
PHP logo
PHP Version 5.5.9-1ubuntu4.9
System Linux 6b8651dc71f0 4.0.3-boot2docker #1 SMP Wed May 13 20:54:49 UTC 2015 x86_64
Build Date Apr 17 2015 11:43:17
Server API FPM/FastCGI
Virtual Directory Support disabled
Configuration File (php.ini) Path /etc/php5/fpm
Loaded Configuration File /etc/php5/fpm/php.ini
@gyaresu
gyaresu / fire-alarm.js
Created July 5, 2015 20:28
Fire Alarm
var five = require('johnny-five')
var board = five.Board()
board.on('ready', function () {
var temp = new five.Temperature({
controller: 'TMP36',
pin: 'A0'
})
var piezo = new five.Piezo(9)
var led = new five.Led(13)
┌─────────────────────────┐
│ │
│ Licence: │███
│ If it breaks │███
│ you get to keep │███
│ both pieces. │███
│ │███
│ Gareth │███
│ 2015-07-08 │███
│ │███
@gyaresu
gyaresu / gist:293494d52d15c43cc32e
Created July 9, 2015 00:55
Ardunio Uno firmata / johnny-five test `node code/CIRC01-code-led-a-strobe.js` fail
gyaresu@shazbot:~/programming/projects/node-ardx|master
⇒ node code/CIRC01-code-led-a-strobe.js
1436403241251 Device(s) /dev/cu.usbmodem1411
/Users/gyaresu/programming/projects/node-ardx/node_modules/johnny-five/node_modules/firmata/lib/firmata.js:743
this.transport.write(new Buffer([START_SYSEX, CAPABILITY_QUERY, END_SYSEX]))
^
TypeError: undefined is not a function
at Board.queryCapabilities (/Users/gyaresu/programming/projects/node-ardx/node_modules/johnny-five/node_modules/firmata/lib/firmata.js:743:18)
at null.<anonymous> (/Users/gyaresu/programming/projects/node-ardx/node_modules/johnny-five/node_modules/firmata/lib/firmata.js:565:14)
at g (events.js:199:16)
gyaresu@shazbot:~/programming/projects/node-ardx|master⚡
⇒ node
> var five = require('johnny-five')
undefined
> var board = new five.Board()
undefined
> 1436405251015 Device(s) /dev/cu.usbmodem1411
/Users/gyaresu/programming/projects/node-ardx/node_modules/johnny-five/node_modules/firmata/lib/firmata.js:584
this.transport.write(new Buffer([REPORT_VERSION]));
^
@gyaresu
gyaresu / bots
Created July 25, 2015 20:25
bot servo test
var five = require('johnny-five')
var board = new five.Board()
board.on('ready', function () {
var servo = new five.Servo(9)
board.repl.inject({
servo: servo
})
function mystery (input) { // input is passed in as 3
var secret = 4 // secret doesn't change in all of this. It stays as 4 and is used in the mystery2 function
input += 2 // 3 += 2 [input = input + 2] which is 5.
function mystery2 (multiplier) {
multiplier *= input /* multiplier = 6 * 5 : multiplier gets set when this returned function is
finally called as param(6) [after getting temporarily set as the variable `hidden`] */
return secret * multiplier // secret is still just 4 and multiplier is now 30 [6 * 5] from the line above.
}
return mystery2 // becomes variable `hidden` and then actually called as param(6)
}
@gyaresu
gyaresu / 390MHz.log
Last active September 11, 2015 14:02
rtl_433 attempting to decode a 390MHz 12 switch AM/OOK garage door
⇒ rtl_433 -a -f 390000000
p_limit: 418
bitbuffer:: Number of rows: 8
[00] {11} 6c c0 : 01101100 110
[01] {11} ab c0 : 10101011 110
[02] {11} 6c c0 : 01101100 110
[03] {11} ab c0 : 10101011 110
[04] {11} 6c c0 : 01101100 110
[05] {11} ab c0 : 10101011 110