Skip to content

Instantly share code, notes, and snippets.

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

Guillermo Caracuel gcaracuel

🏠
Working from home
View GitHub Profile
Note: Tested in Elementary OS Luna
1- Download the firmware from: http://www.broadcom.com/support/802.11/linux_sta.php
2- Unzip a move to dir
3- make
4- Uninstall previous versions:
@gcaracuel
gcaracuel / skeleton.py
Last active April 17, 2018 06:47
UNIX command skeleton (Python)
#!/usr/bin/env python
"""
SYNOPSIS
TODO: Resumed description [-h,--help] [-v,--verbose] [--version]
DESCRIPTION
TODO This describes how to use this script. This docstring
will be printed by the script if there is an error or
@gcaracuel
gcaracuel / SELinux_remove_permisions
Last active August 29, 2015 14:00
Remove SElinux permissions flags (after SELinux disabling)
- First disable SELinux
Change line 'SELINUX=disabled' in /etc/sysconfig/selinux (or 'setenforce 0' to do it now -non permanent-)
- Then you can remove flag permissions for 'old' directories
find / \( -fstype ext2 -o -fstype ext3 -o -fstype ext4 -o -fstype btrfs \) -exec setfattr -x security.selinux {} \;
@gcaracuel
gcaracuel / automongobackup.sh
Created May 27, 2014 11:03
Mongo Backup Script
#!/bin/bash
#
# MongoDB Backup Script
# VER. 0.1
# Note, this is a lobotomized port of AutoMySQLBackup
# (http://sourceforge.net/projects/automysqlbackup/) for use with
# MongoDB.
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@gcaracuel
gcaracuel / elasticsearchinstall.sh
Last active August 29, 2015 14:01
Elasticsearch Installation on Red Hat / CentOS 6
yum update
yum install -y java-1.7.0-openjdk.x86_64
rpm -Uvh https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.2.0.noarch.rpm
curl -L http://github.com/elasticsearch/elasticsearch-servicewrapper/tarball/master | tar -xz
mv *servicewrapper*/service /usr/share/elasticsearch/bin/
@gcaracuel
gcaracuel / HDraspberryPI.sh
Created May 28, 2014 18:12
USB Hard Disk mount on Raspberry Pi
sudo apt-get install ntfs-3g
# Check if your disk is automounted
df -h
# If it is neede umount ir
# umount <path mounted>
@gcaracuel
gcaracuel / ESINSTALL
Created June 2, 2014 10:48
Elasticsearch installation in CentOS
yum update
yum install -y java-1.7.0-openjdk.x86_64
#### Elasticsearch
rpm -Uvh https://download.elasticsearch.org/elasticsearch/elasticsearch/elasticsearch-1.2.0.noarch.rpm
curl -L http://github.com/elasticsearch/elasticsearch-servicewrapper/tarball/master | tar -xz
mv *servicewrapper*/service /usr/share/elasticsearch/bin/
#Steps to install RVM + Ruby 1.9.3 + Rails + nginx + Passenger on CentOS (tested on v5.5)
# Install git and curl, if not already installed
sudo yum install -y git curl-devel
# Create the rvm group and add any users who will be using rvm to the group
sudo su -
groupadd rvm
# Start by adding the root user (required to install RVM)
@gcaracuel
gcaracuel / nginx
Last active August 29, 2015 14:02
nginx Centos 6 Init script (rememeber to tweak config file and your binary location)
#!/bin/sh
#
# nginx - this script starts and stops the nginx daemon
#
# chkconfig: - 85 15
# description: Nginx is an HTTP(S) server, HTTP(S) reverse \
# proxy and IMAP/POP3 proxy server
# processname: nginx
# config: /opt/nginx/conf/nginx.conf
# config: /etc/sysconfig/nginx
@gcaracuel
gcaracuel / Sessions\Default%20Settings
Created August 6, 2014 11:35
My Kitty configuration (Improved with transparency, color, keep-alives, etc)
Comment\\
CtrlTabSwitch\0\
Password\45321\
ForegroundOnBell\0\
SaveWindowPos\0\
WindowState\0\
TermYPos\-1\
TermXPos\-1\
LogTimeRotation\0\
Folder\Default\