Skip to content

Instantly share code, notes, and snippets.

View jonykalavera's full-sized avatar

Luis Fernando Villanueva Pérez jonykalavera

View GitHub Profile
@Ultrabenosaurus
Ultrabenosaurus / README.md
Last active July 16, 2025 19:54
githash - get the short or full SHA for any commit in your current branch's history

githash

Easily get the short or full SHA for any commit in your current branch's history, useful for reverting and sharing specific code states with others.

Why?

Because typing out git rev-list --max-count=1 --abbrev-commit --skip=# HEAD takes far too much effort.

Installation

import base64
import os
import mimetypes
from django.core.files.uploadedfile import SimpleUploadedFile
from tastypie import fields
class Base64FileField(fields.FileField):
"""
A django-tastypie field for handling file-uploads through raw post data.
@marcoslin
marcoslin / .gitignore
Last active May 8, 2025 15:11
Encryption: From PyCrypto to CryptoJS
source.sh
@sayak-sarkar
sayak-sarkar / sublime-text-2.sh
Last active April 29, 2021 16:41
Gist updated to Sublime Text v2.0.2, 64bit
# Adapted from https://gist.github.com/henriquemoody/3288681
#!/bin/sh
SHORTCUT="[Desktop Entry]
Name=Sublime Text 2
Comment=Edit text files
Exec=/usr/local/sublime-text-2/sublime_text
Icon=/usr/local/sublime-text-2/Icon/128x128/sublime_text.png
Terminal=false
Type=Application
@passy
passy / jade.md
Last active August 17, 2020 09:35
Using Yeoman and Jade

Using Yeoman and Jade

Getting started

  • Make sure you have yo installed: npm install -g yo
  • Run: yo webapp
  • Install grunt-contrib-jade: npm install grunt-contrib-jade --save-dev

Customization

@bohde
bohde / tags.py
Created January 30, 2012 03:25
Using django-taggit with django-tastypie
from tastypie.fields import ListField
class TaggedResource(ModelResource):
tags = ListField()
class Meta:
queryset = Model.objects.all()
def build_filters(self, filters=None):
if filters is None: