Skip to content

Instantly share code, notes, and snippets.

View laychopy's full-sized avatar
😀

Luis Albarenga laychopy

😀
View GitHub Profile
@laychopy
laychopy / gist:4245964
Created December 9, 2012 16:41 — forked from josephmosby/gist:4242213
Week One of Ruby on Rails: Step Backwards

I am taking a step back in my Ruby on Rails journey, as it seems that my initial goals may have been a bit too ambitious.

As I said in a previous post, this is not my first foray into web applications. I've been working with Python and its associated frameworks for some time. When I was asked by a friend to work with Ruby, I thought that there would be a fair amount of similarities between Rails and Django given the structural similarities between Ruby and Python. I could not have been more wrong.

The Ruby and Python communities have taken their languages in completely different directions, and that's just fine. Ruby has no Benevolent Dictator for Life like Guido van Rossum, and 37signals has rejected any implications that their organization can be the sole deciders for Rails. That leaves a community free to evolve however it chooses to do so. There are pros and cons to this. Ruby (and consequently, Rails) has the ability to

@laychopy
laychopy / Django Apps
Last active December 11, 2015 09:18 — forked from caiges/Django Apps
Esta son aplicaciones de django muy utiles, para como dice la filosofia de Instagram no reinventar la rueda :).
django-mingus
django-ratings
django-ajax-validation
django-google-analytics
"""
jQuery templates use constructs like:
{{if condition}} print something{{/if}}
Or like:
{% if condition %} print {%=object.something %}{% endif %}
This, of course, completely screws up Django templates,
# Download
wget http://effbot.org/media/downloads/PIL-1.1.7.tar.gz
tar zxf PIL-1.1.7.tar.gz
cd PIL-1.1.7
# Edit setup file
vim setup.py
# Set the following variables
JPEG_ROOT = '/usr/lib64','/usr/include'
ZLIB_ROOT = '/lib64','/usr/include'
@laychopy
laychopy / js2py.py
Created February 12, 2013 23:48 — forked from adragomir/js2py.py
import os, sys
PREAMBLE = '''# Preamble
import sys
def Array(n):
return [0]*n
# Body

Most active GitHub users (git.io/top)

GitHub has released contributions (summary of Pull Requests, opened issues and commits).

This is the count of contributions to public repos at GitHub.com from Fri, 24 Feb 2012 11:56:58 GMT till Sun, 24 Feb 2013 11:56:58 GMT.

To repeat:

  1. Take the first 1000 users in GitHub according to the count of followers those with 150+ followers).
  2. Sort them by number of public contributions.

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
/* Gmail style scrollbar */
::-webkit-scrollbar {
width: 12px
}
::-webkit-scrollbar-thumb {
border-width: 1px 1px 1px 2px
}
::-webkit-scrollbar-track {
border-width: 0
}