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 / about.md
Last active September 26, 2015 18:48 — forked from blaix/about.md
Programming Achievements: How to Level Up as a Developer

Programming Achievements: How to Level Up as a Developer

  1. Select a particular experience to pursue.
  2. Pursue that experience to completion. (Achievement unlocked!)
  3. Reflect on that experience. Really soak it in. Maybe a blog post would be in order?
  4. Return to Step 1, this time selecting a new experience.

This gist is a fork of the gist from this blog post.

@DavidToca
DavidToca / colors.xml
Created December 11, 2011 01:09
a resource file for android apps containing different colors
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="white">#FFFFFF</color>
<color name="yellow">#FFFF00</color>
<color name="fuchsia">#FF00FF</color>
<color name="red">#FF0000</color>
<color name="silver">#C0C0C0</color>
<color name="gray">#808080</color>
<color name="olive">#808000</color>
<color name="purple">#800080</color>
@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>
@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 / 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 / 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 / gist:3146772
Created July 19, 2012 20:59
debugin vagrant
VAGRANT_LOG=INFO vagrant up
@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 / 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 / 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;