Skip to content

Instantly share code, notes, and snippets.

View DavidToca's full-sized avatar
🕶️
testing

David Toca DavidToca

🕶️
testing
View GitHub Profile
@DavidToca
DavidToca / install from zero on windows
Created October 19, 2012 21:58
install from zero on windows
//install chocolatey
@powershell -NoProfile -ExecutionPolicy unrestricted -Command "iex ((new-object net.webclient).DownloadString('http://bit.ly/psChocInstall'))" && SET PATH=%PATH%;%systemdrive%\chocolatey\bin
//console util
cinst Console2
cinst Wget
cinst curl
cinst console-devel
https://github.com/joyent/node/wiki/Installing-Node.js-via-package-manager
#not proof, compiling
https://github.com/joyent/node/wiki/Installation
#if trouble look here
http://stackoverflow.com/questions/7067176/help-on-installing-node-js-on-ubuntu-10-04-from-terminal
@DavidToca
DavidToca / SocketLoggerListener.java
Last active October 8, 2015 07:18
Listen log4j socket output endless times (in case of disconnection)
import java.net.ServerSocket;
import java.net.Socket;
import java.io.InputStream;
import java.io.ObjectInputStream;
import java.io.EOFException;
import java.io.IOException;
import org.apache.log4j.spi.LoggingEvent;
@DavidToca
DavidToca / install_ror_linux_ubuntu_lucid
Last active October 7, 2015 09:57
install from zero git rvm RoR on
#Curl, Git, things for compile, libs ssl, etc
sudo apt-get install curl git-core build-essential libssl-dev libreadline5-dev
#making sure all dependencies, and necesary package's
sudo apt-get install bison openssl libreadline6 libreadline6-dev curl git-core zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-0 libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake
#mysql
sudo apt-get install mysql-server libmysqlclient-dev
# installing rvm
@DavidToca
DavidToca / .irbrc
Created July 19, 2012 21:16
IRB config
require 'rubygems'
require 'wirble'
require 'hirb'
Wirble.init
Wirble.colorize
# hirb (active record output format in table)
Hirb::View.enable
# IRB Options
IRB.conf[:AUTO_INDENT] = true
@DavidToca
DavidToca / gist:3146772
Created July 19, 2012 20:59
debugin vagrant
VAGRANT_LOG=INFO vagrant up
@DavidToca
DavidToca / git.plugin.zsh
Created July 10, 2012 22:17
oh-my-zsh git alias
# Aliases
alias g='git'
compdef g=git
alias gst='git status'
compdef _git gst=git-status
alias gl='git pull'
compdef _git gl=git-pull
alias gup='git fetch && git rebase'
compdef _git gup=git-fetch
alias gp='git push'
@DavidToca
DavidToca / hack.sh
Created April 9, 2012 14:01 — forked from erikh/hack.sh
OSX For Hackers
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
@DavidToca
DavidToca / lets
Created March 16, 2012 16:43 — forked from afgomez/lets.sh
Simple productivity booster
#!/bin/bash
# lets. A productivity booster
# based on ideas from https://gist.github.com/605292
#
# Copy your /etc/hosts to /etc/hosts.play and create a new one called /etc/hosts.work with a list of blocked sites
# Usage: sudo lets [play|work]
if [ $# = 0 ]
then
@DavidToca
DavidToca / colors.xml
Created December 11, 2011 02:57
a resource file for android apps containing different colors
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="White">#FFFFFF</color>
<color name="Ivory">#FFFFF0</color>
<color name="LightYellow">#FFFFE0</color>
<color name="Yellow">#FFFF00</color>
<color name="Snow">#FFFAFA</color>
<color name="FloralWhite">#FFFAF0</color>
<color name="LemonChiffon">#FFFACD</color>
<color name="Cornsilk">#FFF8DC</color>