Skip to content

Instantly share code, notes, and snippets.

View dsaenztagarro's full-sized avatar

David Sáenz Tagarro dsaenztagarro

View GitHub Profile
@dsaenztagarro
dsaenztagarro / GIF-Screencast-OSX.md
Created August 13, 2017 10:55 — 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:

security add-generic-password \
-a my-github-login \
-s github \
-D "GitHub's OAuth2 Token" \
-T "" \
-w the-long-oauth-token
@dsaenztagarro
dsaenztagarro / ember_examples.md
Created October 27, 2015 11:18 — forked from rwjblue/ember_examples.md
Ember Examples
@dsaenztagarro
dsaenztagarro / #1 - Chef Windows Workstation
Created October 16, 2015 22:59 — forked from scarolan/#1 - Chef Windows Workstation
Ten Quick Tips to Improve your Chef Workflow
Contributor: Adam Edwards
1. Install chocolatey – http://chocolatey.org
2. Install PSReadline to give PowerShell readline power – use the –emacs mode in your PowerShell profile so you have history search and other keyboard behavior like bash: https://github.com/lzybkr/PSReadLine
3. Use chocolatey to install ConEmu, a terminal replacement that supports ANSI colors, dynamic resizing, “normal” text selection and cut and paste, and lots of other customizations: cinst conemu. And set the startup shell for ConEmu to PowerShell (not cmd.exe)
4. Use chocolatey to install an editor – if you’re not already an emacs or vim person, use it to install Atom or Sublime, or Notepad++
5. Always use PowerShell – do not use cmd.exe
6. Install ChefDK and use chef shell-init powershell to get at your Chef Ruby environment.
7. Use Pantry – it can automate #1, 3, 4, and 6 and will probably have support for #2. https://github.com/chef/pantry-chef-repo
8. If you get stuck on a box where you don’t an editor or chocolatey and need to e
@dsaenztagarro
dsaenztagarro / tmux_new_session.sh
Created July 10, 2014 20:47
Create new tmux session avoiding nested sessions
TMUX= tmux new-session -d -s name
tmux switch-client -t name
@dsaenztagarro
dsaenztagarro / usb_devices_virtualbox.md
Last active June 30, 2023 08:56
USB devices on VirtualBox
Host commands
VboxManage list usbhost
VBoxManage controlvm usbattach <uuid>|<address>
VBoxManage controlvm usbdetach <uuid>|<address>
Vagrantfile

Choices

  1. Install ghc 7.6.3 and Haskell Platform
  2. Install ghc 7.8.2 and Cabal

Option GHC 7.6.3 + Haskell Platform

GHC 7.6.3

Install Ubuntu 12.04 depencies:

@dsaenztagarro
dsaenztagarro / debug.sh
Created May 28, 2014 19:32
Script for debugging Nodejs
#!/bin/bash
node_command="node --debug app.js"
node_inspector_command="node-inspector"
function getPid {
command=$1
echo `ps -A -o pid,cmd | grep "$command" | grep -v grep | head -n 1 | awk '{print $1}'`
}
echo `getPid $node_command`
@dsaenztagarro
dsaenztagarro / vagrant_config_locale.md
Last active September 25, 2018 20:20
Fix vagrant boxes locale settings

Add these lines to the bottom of the file:

# ~/.bashrc
export LANGUAGE=en_US.UTF-8
export LANG=en_US.UTF-8
export LC_ALL=en_US.UTF-8

After editing the file execute this commands

@dsaenztagarro
dsaenztagarro / rails_unicorn_rvm_error.md
Last active December 18, 2015 05:59
Unicorn and RVM Gemsets

If you have a rvmrc dotfile in your rails project and you are using an specific Gemset for your Ruby version, take care!!

Unicorn ALWAYS uses Ruby version @global gemset. You could get a template error like this: "Could not find XXXX in any of the sources"

If you want to fix quickly this issue you can copy your current gemset of files to global default gemset, like this example:

rvm gemset copy 1.9.3@Rails3.2.11 1.9.3@global