Skip to content

Instantly share code, notes, and snippets.

View calrrox's full-sized avatar
🏠
Remote office

Carlos Torrealba calrrox

🏠
Remote office
View GitHub Profile
@calrrox
calrrox / sublime-text-2.sh
Last active December 20, 2015 13:09 — forked from henriquemoody/sublime-text-2.sh
Install Sublime Text 2 version 2.0.2 on Fedora 19
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 2
Comment=Edit text files
Exec=/usr/local/sublime-text-2/sublime_text
Icon=/usr/local/sublime-text-2/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
Encoding=UTF-8
Categories=Utility;TextEditor;"
@calrrox
calrrox / .ruby_node_git_prompt
Last active February 14, 2020 21:14 — forked from woods/git_svn_bash_prompt.sh
Set the bash prompt according to the current ruby version, node version and branch/status of the current git repository.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the branch/status of the current git repository
# * the return value of the previous command
#
# USAGE:
#
@calrrox
calrrox / rvm_git_bash_prompt.sh
Last active August 29, 2015 14:00
Set the bash prompt according to the current ruby version and gemset, the branch/status of the current git repository (git 1.9.1), the return value of the previous command.
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the current ruby version and gemset
# * the branch/status of the current git repository
# * the return value of the previous command
#
# USAGE:
@calrrox
calrrox / git_bash_prompt.sh
Last active February 5, 2016 16:10
color prompt for git
#!/bin/bash
#
# DESCRIPTION:
#
# Set the bash prompt according to:
# * the branch/status of the current git repository
# * the return value of the previous command
#
# USAGE:
#
@calrrox
calrrox / snippet atom bs3-form
Created February 8, 2016 15:45
snippet for atom
'.text.html':
'Form Bootstrap3':
'prefix': 'bs3-form'
'body': """
<form class="$1" action="$2" method="POST" role="form">
<legend>Form title</legend>
<div class="form-group">
<label for="$3">label</label>
<input type="text" class="form-control" id="$4" placeholder="Input field">
@calrrox
calrrox / ubuntu-14.04-post-install.md
Last active March 16, 2016 15:01
Post install applications for set up a cool environment

First step

  • sudo apt-get install aptitude >> + g =(update)
  • sudo apt-get install ubuntu-restricted-extras

Internet

  • Chrome
     wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | sudo apt-key add -
    

sudo sh -c 'echo "deb [arch=amd64] http://dl.google.com/linux/chrome/deb/ stable main" >> /etc/apt/sources.list.d/google.list'

@calrrox
calrrox / git-post-install.md
Last active March 4, 2016 17:00
Git configurations

Configuración post install:

  • Set user name and email
      git config --global user.name "NAME LASTNAME"
      git config --global user.email email@example.com
    
    
  • Set editor and merge tool
@calrrox
calrrox / postgresql-post-install.md
Created March 4, 2016 17:20
Postgresql configurations
  • Setup new user
    • sudo -u postgres createuser you_user_name -s
    • Set password
      sudo -u postgres psql
      postgres=# \password your_user_name
      
      
@calrrox
calrrox / webpack.config.js
Created July 3, 2016 21:54 — forked from learncodeacademy/webpack.config.js
Sample Basic Webpack Config
var debug = process.env.NODE_ENV !== "production";
var webpack = require('webpack');
module.exports = {
context: __dirname,
devtool: debug ? "inline-sourcemap" : null,
entry: "./js/scripts.js",
output: {
path: __dirname + "/js",
filename: "scripts.min.js"
@calrrox
calrrox / backup_restore.sh
Last active October 6, 2016 18:32 — forked from DTailor/backup_restore.sh
Backup/Restore PostgreSQL Database
# List all databases
sudo -u postgres psql --list
# Create backup file
sudo -u postgres pg_dump [database_name] > dumpl.sql
# Drop the database
sudo -u postgres dropdb [database_name]
# Create a new database