Skip to content

Instantly share code, notes, and snippets.

View rkmax's full-sized avatar

Julian Reyes Escrigas rkmax

View GitHub Profile
var React = require('react'),
mui = require('material-ui')
;
var RadioButtonGroup = React.createClass({
propTypes: {
name: React.PropTypes.string,
onChange: React.PropTypes.func,
options: React.PropTypes.array
},

Gearman can be installed on Windows through cygwin.

Install Cygwin packages

Install cygwin packages (through setup.exe):

  • gcc
  • make
  • libuuid1-devel
  • libiconv
@rkmax
rkmax / output.log
Last active August 29, 2015 14:16 — forked from creationix/output.log
tim@touchsmart:~/Code$ nvm use v0.11.2-generators
Now using node v0.11.2-generators
tim@touchsmart:~/Code$ node --harmony testgen.js
<Buffer 76 61 72 20 66 73 20 3d 20 72 65 71 75 69 72 65 28 27 66 73 27 29 3b 0a 66 75 6e 63 74 69 6f 6e 20 72 65 61 64 46 69 6c 65 28 70 61 74 68 2c 20 65 6e 63 ...>
Sleeping for 2000ms...
Done
#!/bin/bash
PHANTOM_JS="phantomjs-1.9.8-linux-x86_64"
if [[ $EUID -ne 0 ]]; then
echo "You must be a root user" 2>&1
exit 1
else
apt-get update
apt-get install -y build-essential chrpath libssl-dev libxft-dev
apt-get install -y libfreetype6 libfreetype6-dev
apt-get install -y libfontconfig1 libfontconfig1-dev
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="com.cards.notification">
<uses-sdk
android:minSdkVersion="17"
android:targetSdkVersion="17" />
<application
android:allowBackup="true"
@rkmax
rkmax / index_usage.sql
Created June 22, 2015 13:11
Show if you are using your indexes on postgres databases
SELECT
relname,
seq_scan - idx_scan AS too_much_seq,
CASE WHEN seq_scan - idx_scan > 0
THEN 'Missing Index?'
ELSE 'OK' END,
pg_relation_size(relname :: REGCLASS) AS rel_size,
seq_scan,
idx_scan
FROM pg_stat_all_tables
@rkmax
rkmax / Habits & Tasks.md
Last active August 29, 2015 14:24
Habits & Tasks

Habits & Tasks

Model

![Class Diagram](http://yuml.me/diagram/plain/class/ [Task|title:string;recurrence:json]<>-template*>[RecommendedTask|instructions:string], [RecommendedTask]<>-task*>[Habit|title:string;instructions:string;recurrence:json], [PracticeStep]<>-step>[Habit], [User]<>-takingBy>[Habit], [Habit]<>-taskCompletion*>[Completions|completed_at:datetime])

Allow contributors to give users "Tasks" to do or perform within context of a practice

<configuration default="false" name="Models" type="mocha-javascript-test-runner" factoryName="Mocha" singleton="false">
<node-options />
<working-directory>$PROJECT_DIR$</working-directory>
<pass-parent-env>true</pass-parent-env>
<envs>
<env name="NODE_ENV" value="test" />
</envs>
<ui>bdd</ui>
<extra-mocha-options>--timeout=15000</extra-mocha-options>
<test-directory>$PROJECT_DIR$/tests/models</test-directory>

SMS Gateway

Allows communication with Queblo through SMS messages, using twilio webhooks. When someone sends a SMS message to Queblo’s twilio number, then twilio makes a call to Queblo

Attributes

  • Body: content of the SMS message
  • To: Number of the recepient
  • From: Number of the sender
@rkmax
rkmax / install.sh
Last active September 13, 2015 20:10 — forked from wdullaer/install.sh
Install Latest Docker and Docker-compose on Ubuntu
# Ask for the user password
# Script only works if sudo caches the password for a few minutes
sudo true
# Fastest mirrors
echo 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty main restricted universe multiverse' >> /tmp/mirrors.txt
echo 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-updates main restricted universe multiverse' >> /tmp/mirrors.txt
echo 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-backports main restricted universe multiverse' >> /tmp/mirrors.txt
echo 'deb mirror://mirrors.ubuntu.com/mirrors.txt trusty-security main restricted universe multiverse' >> /tmp/mirrors.txt
echo '' >> /tmp/mirrors.txt