Skip to content

Instantly share code, notes, and snippets.

View andru255's full-sized avatar
🇵🇪
:)

Andrés Muñoz andru255

🇵🇪
:)
View GitHub Profile
# edit smb.conf file
# sudo vim /etc/samba/smb.conf
#
# Sample configuration file for the Samba suite for Debian GNU/Linux.
#
#
@andru255
andru255 / gist:6227078
Created August 14, 2013 00:46
Configuracion para trabajar con debian con proxy con brunch + nodejs
sudo npm config set registry http://registry.npmjs.org/
sudo npm set proxy http://172.21.0.83:3128
/*! ******************************
Handlebars helpers
*******************************/
// debug helper
// usage: {{debug}} or {{debug someValue}}
// from: @commondream (http://thinkvitamin.com/code/handlebars-js-part-3-tips-and-tricks/)
Handlebars.registerHelper("debug", function(optionalValue) {
console.log("Current Context");
console.log("====================");
var express = require('express');
var sys = require('util');
var oauth = require('oauth');
var app = express.createServer();
var _twitterConsumerKey = process.env['TWITTER_CONSUMER_KEY'];
var _twitterConsumerSecret = process.env['TWITTER_CONSUMER_SECRET'];
console.log("_twitterConsumerKey: %s and _twitterConsumerSecret %s", process.env['TWITTER_CONSUMER_KEY'], process.env['TWITTER_CONSUMER_SECRET']);
# First, download the latest version from: http://www.sublimetext.com/2
# In my case choice: Linux 64 bits [[http://c758482.r82.cf2.rackcdn.com/Sublime%20Text%202.0.2%20x64.tar.bz2]]
cd ~/downloads
# unzip: Sublime Text 2.0.2 x64.tar.bz2
tar xf Sublime\ Text\ 2.0.2\ x64.tar.bz2
@andru255
andru255 / gist:6491829
Last active December 22, 2015 15:19
Routing dns
http://www.inmotionhosting.com/support/tools/visual-domain-routing
test demo:
http://livingaroundart.com/
var loadQueue = function() {
var q = queue(),
defer = q.defer,
dispatch = d3.dispatch("progress", "complete"),
requests = [];
q.defer = function(load, url) {
return defer(function(callback) {
var req = load(url, function(error, data) {
req.loaded = req.total;
@andru255
andru255 / tips
Last active December 25, 2015 01:19
Tips del video: "El mítico editor VIM #linuxIO" de desarrolloweb :D
1. o minuscula = ubica el cursor a la sgte linea listo para escribir osea entra a modo inserción y enfoca al cursor a la linea sgte
1.1 O = crea una linea nueva sobre el cursor donde estoy y entra a modo insercion y enfoca el cursor a esa nueva linea.
2. :w [ruta_del_archivo] = para guardar un archivo en otra ruta
3. h j k l = izquiera, abajo, arriba, derecha
4. u = para deshacer
@andru255
andru255 / git-alias
Created October 9, 2013 02:28
atajos en el terminal con el git
alias gst='git status'
alias gc='git commit'
alias gco='git checkout'
alias gl='git pull'
alias gpom="git pull origin master"
alias gp='git push'
alias gd='git diff | mate'
alias gb='git branch'
alias gba='git branch -a'
alias del='git branch -d'
@andru255
andru255 / gist:6895967
Last active April 27, 2022 17:48
tips del video: "VIM sobre Linux, comandos avanzados y plugins #linuxIO"
1. s = sustituir el texto en donde estás ubicado
1.1 S = Elimina desde el cursor donde estas hasta el final de la linea, e incluso se pone en modo inserción y tabulado
/// tip chevere
Si quiero hacer multiples acciones basta con estar en modo
visual y tipear:
Ejemplo 1