Skip to content

Instantly share code, notes, and snippets.

View geoom's full-sized avatar
🏠
Working from home

George Mejia geoom

🏠
Working from home
View GitHub Profile
@geoom
geoom / table sizes.txt
Last active April 20, 2018 16:44
table sizes for scotiamatch db á
+-----------------------------------------+------------+
| Table | Size in MB |
+-----------------------------------------+------------+
| batch | 0.08 |
| block_content | 0.06 |
| block_content__body | 0.06 |
| block_content_field_data | 0.08 |
| block_content_field_revision | 0.05 |
| block_content_revision | 0.03 |
| block_content_revision__body | 0.06 |
@geoom
geoom / ssh-chroot-jail.sh
Created November 17, 2017 23:41 — forked from floudet/ssh-chroot-jail.sh
Chroot Jail for SSH Access
# Chroot Jail for SSH Access
# Tested on Ubuntu 14.04.2 LTS and Debian GNU/Linux 8 (jessie)
# Reference : http://allanfeid.com/content/creating-chroot-jail-ssh-access
#
# Had to add/change several things to make it work, including:
# - create lib64 folder
# - copy whoami dependencies that ldd doesn't show to fix 'I have no name!'
# in the customized prompt + create passwd file
#
@geoom
geoom / faces.json
Created June 27, 2017 21:23
faces.json
{
"Faces": [
{
"name": "Oh well!",
"art" : "¯\\_(ツ)_/¯"
},
{
"name": "Disapproving Look",
"art": "ಠ_ಠ"
},
@geoom
geoom / install.md
Created November 24, 2015 06:12 — forked from Micka33/install.md
cassandra on mac OSX

Installing Cassandra on Mac OS X

Install Homebrew

Homebrew is a great little package manager for OS X. If you haven't already, installing it is pretty easy:

ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
@geoom
geoom / arduino_bluetooth_connection.ino
Last active October 31, 2022 15:38
Arduino bluetooth connection by python script on Mac OS X (yosemite)
// first make "pairing" with HC-06 devise
// view devises list by running 'ls /dev/tty.* in terminal, you can see /dev/tty.HC-06-DevB on the list
// then go to arduino editor, and choose your devise bluetooth under the 'Tools > Serial port' menu
// Now open the serial monitor (Tools > Serial monitor).
// You should notice that the red led of the bluetooth module has stopped blinking. That means we are connected!
// Now when you send a “1” the led on the pin 13 should turn ON, and if you send a “0” it should turn off.
void setup() {
// initialize serial:
@geoom
geoom / countries.sql
Last active August 29, 2015 14:26 — forked from adhipg/countries.sql
Sql dump of all the Countries, Country Codes, Phone codes.
CREATE TABLE IF NOT EXISTS `country` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`iso` char(2) NOT NULL,
`name` varchar(80) NOT NULL,
`nicename` varchar(80) NOT NULL,
`iso3` char(3) DEFAULT NULL,
`numcode` smallint(6) DEFAULT NULL,
`phonecode` int(5) NOT NULL,
PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
@geoom
geoom / analizer.py
Last active April 19, 2016 21:17
ANN scripts
class TextualAnalizer(object):
STOP_WORDS = ['a', 'about', 'above', 'after', 'again', 'against', 'all', 'am', 'an', 'and', 'any',
'are', 'aren\'t', 'as', 'at', 'be', 'because', 'been', 'before', 'being', 'below',
'between', 'both', 'but', 'by', 'can\'t', 'cannot', 'could', 'couldn\'t', 'did',
'didn\'t', 'do', 'does', 'doesn\'t', 'doing', 'don\'t', 'down', 'during', 'each',
'few', 'for', 'from', 'further', 'had', 'hadn\'t', 'has', 'hasn\'t', 'have', 'haven\'t',
'having', 'he', 'he\'d', 'he\'ll', 'he\'s', 'her', 'here', 'here\'s', 'hers', 'herself',
'him', 'himself', 'his', 'how', 'how\'s', 'i', 'i\'d', 'i\'ll', 'i\'m', 'i\'ve', 'if',
@geoom
geoom / . aliases
Last active August 29, 2015 14:19
development mac settings
# Detect which `ls` flavor is in use
if ls --color > /dev/null 2>&1; then # GNU `ls`
colorflag="--color"
else # OS X `ls`
colorflag="-G"
fi
# List all files colorized in long format
alias ll='ls -lh'
@geoom
geoom / script.sh
Created December 3, 2014 21:20
Show your branch name on terminal
#################################################### On linux put them on .bashrc file
# Add git branch if its present to PS1
parse_git_branch() {
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}
if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;31m\]$(parse_git_branch)\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w$(parse_git_branch)\$ '
echo "deb http://apt.postgresql.org/pub/repos/apt/ precise-pgdg main" | sudo tee /etc/apt/sources.list.d/pgdg.list
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
sudo apt-get update
sudo apt-get install postgresql-9.3 postgresql-server-dev-9.3 postgresql-contrib-9.3 -y
sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS hstore;'"
sudo su - postgres -c "psql template1 -p 5433 -c 'CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\";'"
sudo su - postgres -c "service postgresql stop"
sudo su - postgres -c '/usr/lib/postgresql/9.3/bin/pg_upgrade -b /usr/lib/postgresql/9.1/bin -B /usr/lib/postgresql/9.3/bin -d /var/lib/postgresql/9.1/main/ -D /var/lib/postgresql/9.3/main/ -O "-c config_file=/etc/postgresql/9.3/main/postgresql.conf" -o "-c config_file=/etc/postgresql/9.1/main/postgresql.conf"'