Skip to content

Instantly share code, notes, and snippets.

@rrevanth
rrevanth / 10tuning.conf
Created October 15, 2015 13:33 — forked from dragolabs/10tuning.conf
Optimazed sysctl.conf and limits.d
# /etc/security/limits.d/10tuning.conf
# max number of open files
* soft nofile 999999
* hard nofile 999999
root soft nofile 999999
root hard nofile 999999
# max stack size (KB)
* soft stack unlimited
@rrevanth
rrevanth / introrx.md
Created November 2, 2015 16:29 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@rrevanth
rrevanth / frp.md
Created November 6, 2015 13:07 — forked from ohanhi/frp.md
Learning FP the hard way: Experiences on the Elm language

Learning FP the hard way: Experiences on the Elm language

by Ossi Hanhinen, @ohanhi

with the support of Futurice 💚.

Licensed under CC BY 4.0.

Foreword

@rrevanth
rrevanth / orient_connector.ex
Created December 10, 2015 15:48 — forked from stoft/orient_connector.ex
Basic OrientDB HTTP/REST backend to Phoenix web framework
defmodule Phtest.OrientConnector do
use Jazz
@base_url "http://localhost:2480/"
@database "Phtest"
@user "admin"
@password "admin"
@basic_auth [basic_auth: {@user, @password}]
def get(document_id, type) do
OrientConnector.get_document(document_id)
@rrevanth
rrevanth / iceberg.css
Created December 20, 2015 06:29 — forked from timhudson/iceberg.css
Pygments Iceberg
.highlight .hll { background-color: #ffffcc }
.highlight { background: #323b3d; color: #bdd6db; background-color: #323b3d }
.highlight .c { color: #537178; background-color: #323b3d } /* Comment */
.highlight .err { color: #bdd6db; background-color: #323b3d } /* Error */
.highlight .g { color: #bdd6db; background-color: #323b3d } /* Generic */
.highlight .k { color: #b1e2f2; background-color: #323b3d } /* Keyword */
.highlight .l { color: #bdd6db; background-color: #323b3d } /* Literal */
.highlight .n { color: #bdd6db; background-color: #323b3d } /* Name */
.highlight .o { color: #bdd6db; background-color: #323b3d } /* Operator */
.highlight .x { color: #bdd6db; background-color: #323b3d } /* Other */
import superagent from 'superagent';
import merge from 'lodash/merge';
import { camelizeKeys, decamelizeKeys } from 'humps';
import config from 'config';
const CALL_API = Symbol.for('Call API');
/**
* Prepare headers for each request and include the token for authentication.
* @param {Boolean} token Authentication token
@rrevanth
rrevanth / PushNotifications.php
Created April 26, 2016 05:02 — forked from joashp/PushNotifications.php
Simple PHP script to send Android Push Notification, iOS Push Notification and Windows Phone 8 Push Notification
<?php
// Server file
class PushNotifications {
// (Android)API access key from Google API's Console.
private static $API_ACCESS_KEY = 'AIzaSyDG3fYAj1uW7VB-wejaMJyJXiO5JagAsYI';
// (iOS) Private key's passphrase.
private static $passphrase = 'joashp';
// (Windows Phone 8) The name of our push channel.
private static $channelName = "joashp";
@rrevanth
rrevanth / composer.json
Created June 14, 2016 04:18 — forked from tobsn/composer.json
deploy magento on elastic beanstalk with composer post install command to write production config
{
"require": {
"magento-hackathon/magento-composer-installer": "3.0.*",
"aydin-hassan/magento-core-composer-installer": "^1.3",
"firegento/magento": "1.9.2.2"
},
"extra": {
"magento-root-dir": "htdocs",
"auto-append-gitignore": true,
"magento-deploystrategy": "copy",
@rrevanth
rrevanth / 50-autobackup.rules
Created July 4, 2016 05:17 — forked from gerryk/50-autobackup.rules
UDEV rule to automatically backup stuff when I attach my backup drive
# UDEV rules to setup automatic backup upon disk insertion
# You can get the discriminant informations with the following command :
# udevinfo -a -p $(udevinfo -q path -n /dev/sda)
KERNEL=="sd?1", ACTION=="add", SUBSYSTEMS=="scsi", ATTRS{vendor}=="Maxtor", ATTRS{model}=="Basics Portable", RUN+="/root/autobackup.sh %k"
@rrevanth
rrevanth / perfectelementary.bash
Created August 19, 2016 04:25
HowTo Install the perfect Elementary-OS
#Download Elementary OS from here:
#http://sourceforge.net/projects/elementaryos/files/stable/
#First you update your system
sudo apt-get update && sudo apt-get dist-upgrade
#Install Google Chrome
wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
sudo sh -c 'echo "deb http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google-chrome.list'