Skip to content

Instantly share code, notes, and snippets.

View grillermo's full-sized avatar
💭
Working to deliver magic!

Guillermo Siliceo grillermo

💭
Working to deliver magic!
View GitHub Profile
@grillermo
grillermo / .vimrc
Created March 24, 2016 03:18
My vimrc
"Author: Guillermo Siliceo Trueba
"
" Add the virtualenv's site-packages to vim path
py << EOF
import os.path
import sys
import vim
if 'VIRTUAL_ENV' in os.environ:
project_base_dir = os.environ['VIRTUAL_ENV']
def self.create_from_webhook_notification(params)
data = params['data']
object = data['object']
payment_data = object['payment_method']
order_receipt = object['reference_id']
# Parse
payment_method = payment_data['object']
fee = object['fee'].to_f
@grillermo
grillermo / .vimrc
Created March 6, 2015 17:50
Ctrlp using ag the silver searcher
"" The Silver Searcher
if executable('ag')
" Use ag over grep
set grepprg=ag\ --nogroup\ --nocolor
" Use ag in CtrlP for listing files. Lightning fast and respects .gitignore
let g:ctrlp_user_command = 'ag %s -l --nocolor -g ""'
" " ag is fast enough that CtrlP doesn't need to cache
let g:ctrlp_use_caching = 0
<img src="https://s3.amazonaws.com/cdn-production.bebitos.mx/assets/logo-para-video.png" height="110" width="200">
@grillermo
grillermo / gist:73b168899c21d30006af
Created May 27, 2014 02:57
4chan on Elliot Rodger the virgin serial killer
I believe in Moot, the patriarch almighty, creator of Reddit and 9gag.
I believe in Elliot Rodger, his only bean, our Lord.
He was conceived by the power of euphoria and born of the Virgin Wizard.
He suffered under grills, was bullied, went postal and an hero'd.
He descended to 4chan.
On the third day he became a meme.
He ascended into virgin heaven and is seated at the right hand of Muhammed.
He will come again when his ass is awarded to some Jihadist martyr.
I believe in euphoria,
@grillermo
grillermo / gist:f48393b01e4a6672cbe8
Last active August 29, 2015 14:01
Canvas email on their Amazon account compromised
<div style='max-width: 400px'>
Canvasaurs,
We were recently made aware of a security breach that affected all of our servers hosted with Amazon, which includes the ones that previously hosted Canvas. The person(s) used our account to order hundreds of expensive servers, likely to mine Bitcoin or other cryptocurrencies. When we detected this activity, we immediately locked down the account.
Unfortunately we have no way of knowing what, if any, information was accessed by the attacker(s). It’s possible they only used our account to order servers, however it’s also possible they accessed our database, and thus user e-mail addresses, encrypted passwords, and other information.
We’d suggest you consider changing your e-mail account password, and the passwords of any services you connected with Canvas. Although Canvas account passwords were encrypted in our database using a modern, secure method called bcrypt, it’s better to be safe than sorry. To reiterate, we found no evidence of an attack targeting Canvas or
@grillermo
grillermo / gist:4200344
Created December 4, 2012 03:52
Filtering by the properties of a model that has us in an m2m
from django.contrib.admin import SimpleListFilter
from store.models import Box
class Items(Model):
name = CharField(max_length=200)
class Box(Model):
items = ManyToManyField(Items)
box_color = CharField(max_length=200,choices=(
('yellow','yellow'),
@grillermo
grillermo / gist:1667113
Created January 24, 2012 01:09
notifications in context
<div id="content">
<div class="notification info">
<p>Te extrañaremos, vuelve pronto.</p>
<span class="close">x<span></span></span></div>
<div id="header">
<img src="/static/images/logo.png">
<h1>Tú descubres a la banda, entre todos la traemos</h1>
<div id="teaser">