Skip to content

Instantly share code, notes, and snippets.

@rrevanth
rrevanth / packageinstall.sh
Last active September 1, 2015 07:56
Elementary OS post install package script
#!/bin/bash
# Fixes sudo issues
if (($EUID != 0)); then
if [[ -t 1 ]]; then
sudo "$0" "$@"
else
exec 1>output_file
gksu "$0 $@"
fi
@rrevanth
rrevanth / ppainstall.sh
Last active July 11, 2018 18:04
Elementary OS PPA script
#!/bin/bash
# Fixes sudo issues
if (($EUID != 0)); then
if [[ -t 1 ]]; then
sudo "$0" "$@"
else
exec 1>output_file
gksu "$0 $@"
fi
@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 */
@rrevanth
rrevanth / Rakefile
Created February 1, 2016 11:36
Rakefile for Jekyll blog
require 'rubygems'
require 'rake'
require 'rdoc'
require 'date'
require 'yaml'
require 'tmpdir'
require 'jekyll'
require 'reduce'
require 'serve'
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";