Skip to content

Instantly share code, notes, and snippets.

View rkmax's full-sized avatar

Julian Reyes Escrigas rkmax

View GitHub Profile

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
<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>
@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

@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
<?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"
#!/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
@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

Gearman can be installed on Windows through cygwin.

Install Cygwin packages

Install cygwin packages (through setup.exe):

  • gcc
  • make
  • libuuid1-devel
  • libiconv
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
},
@rkmax
rkmax / 99-disable-lan-on-wire.sh
Created November 20, 2014 12:59
Deshabilita el wifi del equipo si se conecta el cable de red y lo vuelve a activar al desconectarse
#!/bin/bash
# copy this script to /etc/NetworkManager/dispatcher.d/99-disable-lan-on-wire.sh
# own by root and set permissions to 700
# eth0, eth1, etc.
LAN_IFACE="enp3s0"
if [[ "${1}" = "${LAN_IFACE}" ]]; then
case "${2}" in