Skip to content

Instantly share code, notes, and snippets.

View 0xbepresent's full-sized avatar

Misa 0xbepresent

View GitHub Profile
#!/usr/bin/env python
#
# Converts any integer into a base [BASE] number. I have chosen 62
# as it is meant to represent the integers using all the alphanumeric
# characters, [no special characters] = {0..9}, {A..Z}, {a..z}
#
# I plan on using this to shorten the representation of possibly long ids,
# a la url shortenters
#
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
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
@nuxlli
nuxlli / sublime_text_2_useful_shortcuts.md
Created September 9, 2011 18:51 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 - Useful Shortcuts

Tested in Mac OS X: super == command

Open/Goto


  • super+t: go to file
  • super+ctrl+p: go to project
  • super+r: go to methods
@j-5-s
j-5-s / SomeBackboneView.js
Created September 11, 2011 12:28
how to use backbone and jquery validator together
var someView = Backbone.View.extend({
initialize: function(options) {
},
events: {
'keyup .error': 'validateField'
},
validateField: function(e){
$(e.currentTarget).valid();
},
render: function(){
@tsabat
tsabat / zsh.md
Last active December 25, 2023 19:16
Getting oh-my-zsh to work in Ubuntu
@jexchan
jexchan / multiple_ssh_setting.md
Created April 10, 2012 15:00
Multiple SSH keys for different github accounts

Multiple SSH Keys settings for different github account

create different public key

create different ssh key according the article Mac Set-Up Git

$ ssh-keygen -t rsa -C "your_email@youremail.com"
@raliste
raliste / gist:4091897
Created November 16, 2012 23:31
Joldit's Webpay Plus (Django)
## views.py
import tempfile
import os
import commands
import cgi
from django import http
from django.views.decorators.csrf import csrf_exempt
from django.shortcuts import render
@rbarrois
rbarrois / mock_datetime.py
Created April 21, 2013 20:18
Proper module for patching datetime.datetime.now().
# This code is in the public domain
# Author: Raphaël Barrois
from __future__ import print_function
import datetime
import mock
@madjar
madjar / scrapper.py
Last active March 5, 2023 15:02
A example of scrapper using asyncio and aiohttp
import asyncio
import aiohttp
import bs4
import tqdm
@asyncio.coroutine
def get(*args, **kwargs):
response = yield from aiohttp.request('GET', *args, **kwargs)
return (yield from response.read_and_close(decode=True))
@0xbepresent
0xbepresent / get_regiones_comunas.py
Created March 26, 2014 05:24
Obtiene un listado de objetos Regiones y Comunas con su relacion Region de Chile
# -*- coding: utf-8 -*-
"""
Obtiene un listado de objetos de Regiones y Comunas con su relacion Region de
Chile
@author: misalabs
"""
import requests
from bs4 import BeautifulSoup