I hereby claim:
- I am chuyskywalker on github.
- I am chuyskywalker (https://keybase.io/chuyskywalker) on keybase.
- I have a public key whose fingerprint is 45FC 2659 BCE7 ECCB 629D 3BE7 5A27 4011 BC1A 6F11
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
// when the document is fully loaded, run this function | |
$(document).ready(function(){ | |
// find every checkbox | |
$('input[type="checkbox"]') | |
// and bind to the click method to run this function | |
.click(function(){ | |
// create a variable called "box_value" which has the string from the current element's "value" attribute. | |
// $(this), in the current context, refers to the input-checkbox that is experiencing a click event | |
var box_value = $(this).attr("value"); | |
// since the "value" matches the class name, we can start a selector $() which combines a dot and the box_value variable to form a proper class name. |
package main | |
// second variant, splits process among cores and creates a unique file for each. MUCH faster, but incurs randomness penelty | |
import ( | |
"fmt" | |
"os" | |
"math" | |
"math/rand" | |
"strconv" |
import time | |
import logging | |
import pprint | |
import random | |
from threading import Thread, Event | |
class lastPerThread(logging.Handler): | |
""" | |
A log handler which keeps the last log message availble per thread | |
""" |
<?php | |
echo '<pre>'; | |
/* | |
Have a table like | |
CREATE TABLE `inty` ( | |
`biu` bigint unsigned NOT NULL AUTO_INCREMENT, | |
`bis` bigint NOT NULL , |
<?php | |
/* | |
* Make your Hue lights dance -- a very rudimentary Hue control script | |
*/ | |
$ip = 'your-ip-here'; | |
$user = 'your-username-here'; | |
$lights = array_flip(array(1,2)); // 3,4,5, etc |
<?php | |
require './defs.php'; | |
$gearmanClient = new GearmanClient(); | |
$gearmanClient->addServer(); | |
$modelsToRun = [ | |
ModelA::CLASS, | |
ModelB::CLASS, |
# echo '{"test":123, "peso": [1,2,3]}' | docker run -i --rm --networking=false app /bin/bash -c 'cat - | php app.php' | |
object(stdClass)#1 (2) { | |
["test"]=> | |
int(123) | |
["peso"]=> | |
array(3) { | |
[0]=> | |
int(1) | |
[1]=> | |
int(2) |
goofy: | |
- cmd.run: | |
- name: echo hello |
Virtualbox | |
613mb ram | |
CentOS6.4 | |
- based on this box: https://github.com/2creatives/vagrant-centos/releases/download/v6.5.2/centos65-x86_64-20131219.box | |
- from this fellow: https://github.com/2creatives/vagrant-centos/ | |
Just a basic, masterless provision that takes 1 minutes to run. | |
Minion file looks like: |