Skip to content

Instantly share code, notes, and snippets.

@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
@jcypret
jcypret / hashids.rb
Created February 10, 2015 07:40
Initializer to enable Hashids in a Rails app
module HashidsSupport
extend ActiveSupport::Concern
class_methods do
def hashids
Hashids.new(table_name, 6)
end
def encode_id(id)
hashids.encode(id)
@miohtama
miohtama / presto.py
Created August 23, 2015 13:41
PrestoDoctor OAuth implementation with Authomatic, Pyramid and Python 3.x
"""Prestodoctor OAuth on Authomatic implementation with data import and mapping to internal database."""
from argparse import Namespace
import time
from authomatic.core import json_qs_parser
from authomatic.providers.oauth2 import OAuth2
from websauna.system.model import now
from websauna.system.user.social import EmailSocialLoginMapper, \
NotSatisfiedWithData
@paulirish
paulirish / how-to-view-source-of-chrome-extension.md
Last active July 22, 2024 13:58
How to view-source of a Chrome extension

Option 1: Command-line download extension as zip and extract

extension_id=jifpbeccnghkjeaalbbjmodiffmgedin   # change this ID
curl -L -o "$extension_id.zip" "https://clients2.google.com/service/update2/crx?response=redirect&os=mac&arch=x86-64&nacl_arch=x86-64&prod=chromecrx&prodchannel=stable&prodversion=44.0.2403.130&x=id%3D$extension_id%26uc" 
unzip -d "$extension_id-source" "$extension_id.zip"

Thx to crxviewer for the magic download URL.