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 / 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
@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 / .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 / 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;"