Skip to content

Instantly share code, notes, and snippets.

View epinapala's full-sized avatar

Eswar Pinapala epinapala

View GitHub Profile
@epinapala
epinapala / logitech-harmony-remote-on-linux.md
Last active December 14, 2015 11:40 — forked from amhendley/logitech-harmony-remote-on-linux.md
Setting Up a Logitech Harmony Remote on Linux

Setting Up a Logitech Harmony Remote on Linux

After a fair bit of web searching and hacking, the following information should enable you in the configuration of your Logitech Harmony Remote and installation of client interfacing software on Linux to update your universal remote.

These instructions were compiled using Linux Mint 17 (Qiana) x86_64 and Firefox 34 at the time of writing.

Steps

Install Dependencies

The following is a list of identified libraries and tools the subsequent software for using your Logitech Harmony Remote.

@epinapala
epinapala / uninstall_node.sh
Created November 25, 2015 00:37
Uninstall nodejs from Mac
#!/bin/sh
(( ${#} > 0 )) || {
echo 'DISCLAIMER: USE THIS SCRIPT AT YOUR OWN RISK!'
echo 'THE AUTHOR TAKES NO RESPONSIBILITY FOR THE RESULTS OF THIS SCRIPT.'
echo "Disclaimer aside, this worked for the author, for what that's worth."
echo 'Press Control-C to quit now.'
read
echo 'Re-running the script with sudo.'
echo 'You may be prompted for a password.'
sudo ${0} sudo
@epinapala
epinapala / README.md
Created October 24, 2015 21:51 — forked from teffalump/README.md
OpenWRT adblock implementation

Description

In its basic usage, this script will modify the router such that blocked addresses are null routed and unreachable. Since the address blocklist is full of advertising, malware, and tracking servers, this setup is generally a good thing. In addition, the router will update the blocklist weekly. However, the blocking is leaky, so do not expect everything to be blocked.

Setup

The script must be copied to an OpenWRT router (gargoyle firmware works fine, too).

For example, if the router is located at 192.168.1.1:

@epinapala
epinapala / lampp.sh
Created October 7, 2015 06:18
lampp without mysql , webmin and proftpd
#!/bin/bash
#
# For RedHat (thanks to Sudhaker Raj):
# chkconfig: 345 95 05
# description: Starts and stops the XAMPP \
# used to control Apache, MySQL, ProFTPD.
# For SuSE:
### BEGIN INIT INFO
# Provides: apache2 httpd2 xampp
# Required-Start: $local_fs $remote_fs $network
@epinapala
epinapala / wps_openwrt.sh
Last active August 29, 2015 14:27 — forked from alghanmi/wps_openwrt.sh
WPS on OpenWRT -- Enabling Wi-Fi Protected Setup on OpenWRT
##
## WPS on OpenWRT
## This script enables Wi-Fi Protected Setup on OpenWRT.
##
## Resources
## http://wiki.openwrt.org/doc/uci/wireless#wps.options
##
#Install the full wpad package
opkg update
@epinapala
epinapala / twitter.js
Last active August 29, 2015 14:11 — forked from cjoudrey/twitter.js
// This example shows how to render pages that perform AJAX calls
// upon page load.
//
// Instead of waiting a fixed amount of time before doing the render,
// we are keeping track of every resource that is loaded.
//
// Once all resources are loaded, we wait a small amount of time
// (resourceWait) in case these resources load other resources.
//
// The page is rendered after a maximum amount of time (maxRenderTime)
@epinapala
epinapala / git_track_all.sh
Last active August 29, 2015 14:06
Whenever you clone a repo, you do not clone all of its branches by default. If you wish to do so, use the following script:
#!/bin/bash
# Simple shell script to clone all of remote branches by default.
: ' sudo bash \
-c \
"$(curl -fsSL https://gist.githubusercontent.com/epinapala/7235b5cfce6e5dd241ba/raw/git_track_all.sh)"
'
for branch in `git branch -a | grep remotes | grep -v HEAD | grep -v master `; do
git branch --track ${branch#remotes/origin/} $branch
done
data:text/html, <style type="text/css">.e{position:absolute;top:0;right:0;bottom:0;left:0;}</style><div class="e" id="editor"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("editor");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/ruby");</script>
<!--
For other language: Instead of `ace/mode/ruby`, Use
Markdown -> `ace/mode/markdown`
Python -> `ace/mode/python`
C/C++ -> `ace/mode/c_cpp`
Javscript -> `ace/mode/javascript`
Java -> `ace/mode/java`
Scala- -> `ace/mode/scala`
@epinapala
epinapala / windows.h__.js
Created November 18, 2012 08:48
windows.h.js INFINITY
var ffi = require('ffi'),
ref = require('ref'),
Struct = require('ref-struct'),
Library = require('./Library'),
Type = ref.Type,
NULL = ref.NULL,
isNull = ref.isNull;
var groups = ['libs', 'types', 'structs', 'callbacks', 'enums'];