I hereby claim:
- I am sagarnikam123 on github.
- I am sagarnikam123 (https://keybase.io/sagarnikam123) on keybase.
- I have a public key ASCd2iI6vadCVSHDVzoy7GcyAGXEc7kVomS-GUx7O3vTbwo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
#Usernames for diff. amazon machines | |
Amazon Linux - ec2-user | |
RHEL5 - root / ec2-user | |
Ubuntu - ubuntu | |
Fedora - fedora / ec2-user | |
SUSE Linux - root / ec2-user | |
#Change permission on .pem file | |
chmod 400 msys-aws-nvirginia-analytics.pem |
#fbDownloadPhoto.py | |
''' | |
This script downloads all photos from Facebook fan page | |
Pre requisite | |
- Facebook Fanpage id | |
- Python 2.7 | |
- Python pip | |
- Facebook-python-sdk (http://facebook-sdk.readthedocs.org/en/latest/install.html) |
##### remove PDF password (only if you know the password of PDF) | |
### qpdf | |
sudo apt-get install qpdf | |
qpdf --password=password --decrypt input.pdf output_decrept.pdf | |
### pdftops |
# Script to enable wifi-hotspot on Linux (Ubuntu) Machine. | |
# remove hostapd & ap-hotspot if already present (ubuntu 14.04) | |
sudo apt-get remove ap-hotspot | |
sudo apt-get remove hostapd | |
# we are downloading specific version of hostpad, bcoz in 14.04, it is buggify. | |
# if below lines not working then directly install | |
# sudo apt-get install hostpad |
This is text file for loading R code to Gist |
#! /usr/bin/env Rscript | |
# reducer.R - Wordcount program in R | |
# script for Reducer (R-Hadoop integration) | |
trimWhiteSpace <- function(line) gsub("(^ +)|( +$)", "", line) | |
splitLine <- function(line) { | |
val <- unlist(strsplit(line, "\t")) | |
list(word = val[1], count = as.integer(val[2])) |
#! /usr/bin/env Rscript | |
# mapper.R - Wordcount program in R | |
# script for Mapper (R-Hadoop integration) | |
trimWhiteSpace <- function(line) gsub("(^ +)|( +$)", "", line) | |
splitIntoWords <- function(line) unlist(strsplit(line, "[[:space:]]+")) | |
## **** could wo with a single readLines or in blocks | |
con <- file("stdin", open = "r") |