Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Allan Brazute EthraZa

🏠
Working from home
Block or report user

Report or block EthraZa

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@nicksantamaria
nicksantamaria / mydumper-install-ubuntu14.04.sh
Created Dec 29, 2015
Install mydumper / myloader from source on Ubuntu 14.04
View mydumper-install-ubuntu14.04.sh
# Switch to root user.
sudo su -
# Update apt repositories and install dependencies.
apt-get update
apt-get install libglib2.0-dev libmysqlclient15-dev zlib1g-dev libpcre3-dev libssl-dev cmake
# Download mydumper source and move to appropriate directory.
cd /usr/local/share
wget https://launchpad.net/mydumper/0.9/0.9.1/+download/mydumper-0.9.1.tar.gz
@svnlto
svnlto / index.js
Created Jun 4, 2015
FileReader Promise Helper
View index.js
const readFile = (file) => {
let reader = new global.FileReader();
return new Promise((resolve, reject) => {
reader.onload = (event) => {
file.data = event.target. result;
resolve(file);
};
reader.onerror = () => {
@cjus
cjus / jsonval.sh
Created Jun 26, 2011
Extract a JSON value from a BASH script
View jsonval.sh
#!/bin/bash
function jsonval {
temp=`echo $json | sed 's/\\\\\//\//g' | sed 's/[{}]//g' | awk -v k="text" '{n=split($0,a,","); for (i=1; i<=n; i++) print a[i]}' | sed 's/\"\:\"/\|/g' | sed 's/[\,]/ /g' | sed 's/\"//g' | grep -w $prop`
echo ${temp##*|}
}
json=`curl -s -X GET http://twitter.com/users/show/$1.json`
prop='profile_image_url'
picurl=`jsonval`
You can’t perform that action at this time.