Skip to content

Instantly share code, notes, and snippets.

View danest's full-sized avatar
😶

Kevin Urrutia danest

😶
View GitHub Profile
<script type="text/javascript" src="https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){
var timer;
function changeIndex(){
$('li').each(function(i){
//console.log($(this).width());
@danest
danest / circles.html
Created February 26, 2012 16:28
CSS3 Moving Circles
<style type="text/css" media="screen">
#circle div {
background-color: #000;
float: left;
height: 60px;
margin-left: 10px;
width: 60px;
-webkit-animation-name: circle_move;
-webkit-border-radius: 60px;
-webkit-animation-duration: 4s;
@danest
danest / gist:3001605
Created June 27, 2012 05:03 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@danest
danest / ruby_oauth_token_generator.rb
Created November 5, 2012 00:12 — forked from tsycho/ruby_oauth_token_generator.rb
Ruby Gmail OAuth token generator
require 'hmac-sha1'
require 'base64'
require 'cgi'
module OauthHelper
def URLEscape(text)
return CGI.escape(text).gsub("+", "%20")
end
@danest
danest / Custom.css
Created February 16, 2013 04:59 — forked from bentruyman/Custom.css
/**********************************************/
/*
/* IR_Black Skin by Ben Truyman - 2011
/*
/* Based on Todd Werth's IR_Black:
/* http://blog.toddwerth.com/entries/2
/*
/* Inspired by Darcy Clarke's blog post:
/* http://darcyclarke.me/design/skin-your-chrome-inspector/
/*
@danest
danest / Log-.md
Created April 13, 2013 21:11 — forked from bgrins/Log-.md

Javascript log Function

Every time I start a new project, I want to pull in a log function that allows the same functionality as the console.log, including the full functionality of the Console API.

There are a lot of ways to do this, but many are lacking. A common problem with wrapper functions is that the line number that shows up next to the log is the line number of the log function itself, not where log was invoked. There are also times where the arguments get logged in a way that isn't quite the same as the native function.

This is an attempt to once and for all document the function that I pull in to new projects. There are two different options:

  • The full version: Inspired by the plugin in HTML5 Boilerplate. Use this if you are writing an application and want to create a window.log function. Additionally,

Template Components

Used to provide structural templates.

Pattern

t-template-name
t-template-name--modifier-name
t-template-name__subcomponent-name--subcomponent-modifier-name
# ** ERROR 1 **
# FATAL: lock file "postmaster.pid" already exists
# HINT: Is another postmaster (PID 4646) running in data directory "/usr/local/var/postgres"?
#
# ** ERROR 2 **
# Is the server running locally and accepting connections on Unix domain socket "/tmp/.s.PGSQL.5432"?
#
# To fix one of this errors:
cat /usr/local/var/postgres/postmaster.pid # pid is the number on first line
@danest
danest / gist:7903428
Created December 11, 2013 01:08
The Definition of Success
My birthday is around the corner and as I grow older (which one hopes will come with more wisdom), all the pieces of my life are starting to fall into place. I’m beginning to get to really know myself—what I love and what I can’t stand, the strength of family and friendships, that quality truly is more important than quantity, and all of the other promises and perils of being an adult—and to be brave enough to embrace who I am without making excuses. Above all else, the last year has helped me redefine what success means to me.
When I first started thinking about career options for myself, I gravitated towards things that paid high salaries. Money meant success in my eyes.
“Oh, look. An architect can make up to $200,000 a year.”
“Wow! Being a pharmacist pays really well.”
“I want to be an anesthesiologist and make $300,000!”
It was pretty silly of me.
@danest
danest / zaarlyaddress.py
Created January 31, 2014 18:38
Zaarly - Parse usable Street Address, City, State, Zip from a string, Returns a list of all addresses found in the given string
# Copyright 2007,2008,2009,2011 Everyblock LLC, OpenPlans, and contributors
#
# This file is part of ebdata
#
# ebdata is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# ebdata is distributed in the hope that it will be useful,