Skip to content

Instantly share code, notes, and snippets.

View roubles's full-sized avatar
🖥️
converting caffeine to code

Pranab Mehta roubles

🖥️
converting caffeine to code
View GitHub Profile
@roubles
roubles / installsensu.md
Last active July 10, 2018 15:43
Installing Sensu on OSX

Install redis

Use homebrew:

    $ brew install redis

Redis config is here: /usr/local/etc/redis.conf

Starting redis

Using Alexa to Open and Close your garage door

This guide assumes a functioning Zwave garage door opener configured with Smartthings. As of this writing Alexa does not support opening and closing garage doors natively. So, some sorcery is required.

Create a routine that opens your garage

Just create a routine, say, "Open garage door" and configure it open your garage door.

Create a routine that closes your garage

Just create a routine, say, "Close garage door" and configure it open your garage door.

@roubles
roubles / synergy.md
Last active May 28, 2022 00:06
How to install Synergy on OS X Sierra (10.12)

Install homebrew

brew.sh

Install cmake and qt

$ brew install cmake qt

Install XCode

@roubles
roubles / gist:79ede5f7410b0ff4c44046f1f50838c8
Last active November 23, 2023 16:17
A pattern for creating a reliable unique constraint in Cassandra

Unique Constraints in Cassandra

Cassandra is a NoSQL database, and is meant for different applications than traditional relational databases. Nevertheless, developers will want (and try) to implement RDBMS features in Cassandra. Unique constraints is one such example.

Many people have asked about creating unique constraints in Cassandra: 1, 2, 3, 4. There is no definitive answer. The most popular answer seems to be to not even try it. Square peg, round hole. If you need unique constraints, Cassandra may not be the tool for the job. Others have suggested to use LWT/CAS. It should be noted that, simply using LWT/CAS does not give us reliable unique constraints that we get i

@roubles
roubles / gist:42ab992afa65d906b4c2433524e41514
Last active July 12, 2017 17:41
Use Alexa to arm/disarm Simplisafe
@roubles
roubles / EmailOSXCommandLine.md
Last active October 8, 2024 18:58
Send email from OSX Command line using gmail as SMTP

#Step 1: Update /etc/postfix/main.cf

$ sudo vim /etc/postfix/main.cf

Add the following lines, anywhere really, but preferably under the relayhost section:

relayhost = smtp.gmail.com:587
smtp_sasl_auth_enable = yes