Skip to content

Instantly share code, notes, and snippets.

View gugat's full-sized avatar

Gustavo Salazar gugat

  • Buk
  • Santiago - Chile
View GitHub Profile
@gugat
gugat / bbb-web-deploy.sh
Last active August 29, 2015 14:01
steps to deploy bigbluebutton .war file to production after changes applied in development
#!/bin/bash
cd ~/dev/bigbluebutton/bigbluebutton-web
sudo rm ./target/bigbluebutton-0.1.war
grails war
sudo rm -r /var/lib/tomcat7/webapps/bigbluebutton*
sudo cp ./target/bigbluebutton-0.1.war /var/lib/tomcat7/webapps/
sudo service tomcat7 restart
sudo mv /var/lib/tomcat7/webapps/bigbluebutton-0.1 /var/lib/tomcat7/webapps/bigbluebutton
sudo service tomcat7 restart
@gugat
gugat / play_music.rb
Last active August 29, 2015 14:04
Take song name from file and play it with mplayer
#!/usr/bin/ruby
a = IO.readlines("/home/guga/Music/playlist_regueton").each do |line|
if !line.strip.empty?
cmd = `find '/media/guga/Mi disco/' -name #{line.strip}*`
puts cmd
`mplayer "#{cmd.strip}"`
end
end
@gugat
gugat / draggable_marker
Created September 29, 2014 19:32
google maps
function initialize() {
var gyeLatLng = new google.maps.LatLng(-2.1705289,-79.919566);
var mapOptions = {
center: gyeLatLng,
zoom: 13
};
var map = new google.maps.Map(document.getElementById('map-canvas'),
mapOptions);
var marker = new google.maps.Marker({
@gugat
gugat / update_firmware.sh
Created December 10, 2014 08:33
dell inspiron 1420
sudo wget -q -O - http://linux.dell.com/repo/firmware/bootstrap.cgi | bash
sudo apt-get install firmware-addon-dell
sudo apt-get install $(bootstrap_firmware -a)
sudo update_firmware
@gugat
gugat / interfaces
Created January 21, 2015 17:12
Ubuntu conf files
#
#
#/etc/network/interfaces
#
#
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
@gugat
gugat / install-aptana
Created April 6, 2012 19:39
Public Installation scripts
#/bin/bash
#
# Script to install Aptana and create a launcher.
# Not tested.
# Based on instructions: http://www.ubuntu-guia.com/2011/07/instalar-aptana-studio-3-ubuntu.html
# Author: Gustavo Salazar <guga.salazar.loor@gmail.com>
# Date: July 29, 2012
# How to use:
# chmod +x install-aptana
@gugat
gugat / install-ffmpeg.sh
Created August 13, 2012 16:58
ffmpeg for bigbluebutton
# install dependencies
sudo apt-get install build-essential git-core checkinstall yasm texi2html libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libsdl1.2-dev libtheora-dev libvorbis-dev libx11-dev libxfixes-dev libxvidcore-dev zlib1g-dev --yes
# Install libvpx
cd /usr/local/src
sudo git clone http://git.chromium.org/webm/libvpx.git
cd libvpx
sudo ./configure
sudo make
sudo make install
@gugat
gugat / goto.sh
Last active December 14, 2015 19:33
Utility to go to any directory (previously configured in the script)
#!/bin/bash
#
# Author: Gustavo Salazar <guga.salazar.loor@gmail.com>
# Created: 2015-12-14
#
# Setup:
#
# * Place this script in /usr/local/bin/
@gugat
gugat / add_to_bash_profile
Last active December 16, 2015 08:29
Commands to add in the file .bash_profile . They are executed when I login
rvm use 1.9.3
rvm gemset use migemsetloco
sudo ntpdate ntp.ubuntu.net
@gugat
gugat / find_items_ocurrence.clj
Created December 16, 2015 06:34
Find ocurrences of items
(let [my_list '(a b b c a a c) my_set (set my_list)]
(zipmap
my_set
(map
(fn [y]
(count
(filter
(fn [x] (= x y)) my_list
)