Skip to content

Instantly share code, notes, and snippets.

View patriciojofre's full-sized avatar
🇨🇱

Pato Jofre patriciojofre

🇨🇱
View GitHub Profile
@patriciojofre
patriciojofre / my_spec.rb
Created October 16, 2018 18:24
Chargebee Webhook test
ChargeBee::WebhookTesting.sample_notification("PaymentSucceeded", your_subscription_id)
@patriciojofre
patriciojofre / RSA Encrypt-Decrypt Ruby -Javascript
Last active November 16, 2017 01:39
RSA Encrypt-Decrypt Ruby - Javascript
1- Open encrypt_decrypt.html file in browser
2- Get public key from developer console
3- Copy and paste public key in RSA.rb
4- Decrypt message in developer console using crypt.decrypt("encrypted message from ruby");
#!/bin/bash
# Install a custom Influxdb version - https://docs.influxdata.com/influxdb/v1.2/
#
# Add at least the following environment variables to your project configuration
# (otherwise the defaults below will be used).
# * export INFLUX_VERSION=1.2.1
# * export INFLUX_DB=your_database
#
INFLUX_VERSION=${INFLUX_VERSION:="1.2.2"}
@patriciojofre
patriciojofre / self_signed_cert.rb
Created September 6, 2016 23:32 — forked from nickyp/self_signed_cert.rb
create a self-signed certificate using ruby-openssl
We couldn’t find that file to show.
@patriciojofre
patriciojofre / gist:503d638a2d0f00735fa2ed799027564b
Created August 12, 2016 16:54
convert mobileconfig to xml
security cms -D -i name_of_config_file.mobileconfig
it { should validate_uniqueness_of(:field_id).scoped_to(:other_field, :other_field).with_message("your message") }
@patriciojofre
patriciojofre / .js
Created June 16, 2016 23:31
remove backbone model only from collection (not sending delete method to server)
model.trigger('destroy', model)
@patriciojofre
patriciojofre / pull-request-template.md
Created May 26, 2016 21:37 — forked from Lordnibbler/pull-request-template.md
Sample Pull Request Template

Status

READY/IN DEVELOPMENT/HOLD

Migrations

YES | NO

Description

A few sentences describing the overall goals of the pull request's commits.

Related PRs

add this lines in /etc/apt/sources.list (sudo)
deb http://www.apache.org/dist/cassandra/debian 10x main
deb-src http://www.apache.org/dist/cassandra/debian 10x main
then
sudo apt-get update
sudo apt-get install cassandra
start cassandra
@patriciojofre
patriciojofre / gist:17c5d4023e1d095e8de51bc5c516c5a2
Created April 8, 2016 14:13
Install Mariadb 10.0 with Cassandra engine
sudo add-apt-repository 'deb [arch=amd64,i386] http://mirror.edatel.net.co/mariadb/repo/10.0/ubuntu precise main'
sudo apt-get update
sudo apt-get install mariadb-server
log into mariadb from terminal
mysql --user=your_user
then
INSTALL PLUGIN cassandra SONAME 'ha_cassandra.so';