Skip to content

Instantly share code, notes, and snippets.

View ovargas27's full-sized avatar

Omar ovargas27

  • Regalii
  • Toluca, Mex
View GitHub Profile
@ovargas27
ovargas27 / GIF-Screencast-OSX.md
Created May 19, 2017 18:00 — forked from dergachev/GIF-Screencast-OSX.md
OS X Screencast to animated GIF

OS X Screencast to animated GIF

This gist shows how to create a GIF screencast using only free OS X tools: QuickTime, ffmpeg, and gifsicle.

Screencapture GIF

Instructions

To capture the video (filesize: 19MB), using the free "QuickTime Player" application:

@ovargas27
ovargas27 / install_ruby2.0.sh
Created May 13, 2013 19:58
install ruby 2.0.0-p0
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/2.0/ruby-2.0.0-p0.tar.gz
tar -xvzf ruby-2.0.0-p0.tar.gz
cd ruby-2.0.0-p0/
./configure --prefix=/usr/local
make
make install
@ovargas27
ovargas27 / chef_solo_bootstrap.sh
Last active December 15, 2015 10:59 — forked from ryanb/chef_solo_bootstrap.sh
Install Ruby 1.9.3-p392 / Chef on Ubuntu precise 12.04
#!/usr/bin/env bash
apt-get -y update
apt-get -y install build-essential zlib1g-dev libssl-dev libreadline6-dev libyaml-dev
cd /tmp
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p392.tar.gz
tar -xvzf ruby-1.9.3-p392.tar.gz
cd ruby-1.9.3-p392/
./configure --prefix=/usr/local
make
make install
@ovargas27
ovargas27 / Ubuntu rbenv
Created November 13, 2012 02:11 — forked from HatemMahmoud/Ubuntu rbenv
Installing Ruby 1.9.3 with OpenSSL on Debian 6.0.6 using ruby-build and rbenv
# for more info: https://gist.github.com/1120938
@ovargas27
ovargas27 / ubuntu_text_mode.md
Created November 9, 2012 18:58
Ubuntu - Text mode
sudo vi /etc/default/grub # enter password when needed

change line

GRUB_CMDLINE_LINUX_DEFAULT=”quiet splash”

into

@ovargas27
ovargas27 / gist:4015805
Created November 5, 2012 07:30 — forked from davatron5000/gist:2254924
Static Site Generators

Backstory: I decided to crowdsource static site generator recommendations, so the following are actual real world suggested-to-me results. I then took those and sorted them by language/server and, just for a decent relative metric, their Github Watcher count. If you want a heap of other projects (including other languages like Haskell and Python) Nanoc has the mother of all site generator lists. If you recommend another one, by all means add a comment.

Ruby

@ovargas27
ovargas27 / vimrc-avoid-arrows
Created April 6, 2012 00:40
Force use of ghjk keys on vim
" Use the correct keys (fubar)
nnoremap <Left> :echoe "Use h noob"<CR>
nnoremap <Right> :echoe "Use l noob"<CR>
nnoremap <Up> :echoe "Use k noob"<CR>
nnoremap <Down> :echoe "Use j noob"<CR>
@ovargas27
ovargas27 / devise_user.rb
Created August 9, 2011 23:29
Devise and OAuth
class DeviseUser < ActiveRecord::Base
devise :database_authenticatable, :registerable, :recoverable, :rememberable, :trackable, :validatable
attr_accessible :email, :name, :password, :password_confirmation, :remember_me
has_many :posts, :as => :authorizable
end
@ovargas27
ovargas27 / eye_color.js
Created July 11, 2011 18:12
Swith in js
function updateShadowColorValues(value){
var eye_color = "none";
switch (true) // << compare true with case value
{
case (value == 0):
eye_color = "cero [" + value + "]";
break;
case (value > 0 && value < 21):
eye_color = "white [" + value + "]";
break;
@ovargas27
ovargas27 / simple-jquery-model-dialog.html.erb
Created June 8, 2011 16:19
Modal dialog with jQuery UI
<%= link_to 'New brand', '#new-brand-link', {:id => "new-brand-link"} %>
<div id="new-brand-form" title="Create new brand">
<%= form_for [:admin, @brand], :remote => true do |form| %>
<%= form.label :name %>
<%= form.text_field :name %><br />
<%= form.submit 'Save' %><br />
<% end %>
</div>