Skip to content

Instantly share code, notes, and snippets.

View bryanveloso's full-sized avatar

Bryan Veloso bryanveloso

View GitHub Profile
@robhudson
robhudson / clean_settings.py
Created May 28, 2009 14:06
Cleaned up and alphabetical settings
import os
PROJECT_PATH = os.path.realpath(os.path.dirname(__file__))
ADMINS = (('Your Name', 'your_email@domain.com'),)
ADMIN_MEDIA_PREFIX = '/static/admin/'
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql_psycopg2',
'NAME': '',
'USER': '',
@endolith
endolith / Has weird right-to-left characters.txt
Last active April 7, 2024 01:38
Unicode kaomoji smileys emoticons emoji
ּ_בּ
בּ_בּ
טּ_טּ
כּ‗כּ
לּ_לּ
מּ_מּ
סּ_סּ
תּ_תּ
٩(×̯×)۶
٩(̾●̮̮̃̾•̃̾)۶
@nathansmith
nathansmith / module_pattern_init.js
Created January 11, 2010 17:08
Init + Module Pattern JS
// JS Module Pattern:
// http://j.mp/module-pattern
// Redefine: $, window, document, undefined.
var APP = (function($, window, document, undefined) {
// Automatically calls all functions in APP.init
$(document).ready(function() {
APP.go();
});
@nathansmith
nathansmith / html_reset.css
Created January 28, 2010 00:02
Reset for HTML4 / HTML5
/* `XHTML, HTML4, HTML5 Reset
----------------------------------------------------------------------------------------------------*/
a,
abbr,
acronym,
address,
applet,
article,
aside,
gemcutter => redis downloads spec
=================================
keys
----
downloads => global counter for all gem downloads
downloads:today => sorted set for downloads from today
downloads:rubygem:rails => counter for all rails downloads
downloads:version:rails-2.3.5 => counter for all rails 2.3.5 downloads
@lukeredpath
lukeredpath / LICENSE
Last active March 22, 2020 08:21
A decorator around UILocalizedIndexedCollation that automatically adds the search icon. Updated to support ARC.
Copyright (c) 2010 Luke Redpath
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
upstream wsgidav {
server unix:/tmp/wsgidav.sock fail_timeout=0;
}
# non-HTTPS redirect elided...
server {
listen 443;
server_name dav.domain.com;
access_log /var/log/nginx/dav.domain.com.access.log;
# from __future__ import with_statement # py2.5
from contextlib import contextmanager
import logging
@contextmanager
def log_execution_time(log_msg):
"""
Context manager which logs the time spent doing a
particular activity.
Check if a site it running PHP by appending this query string...
?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000
Example:
http://php.net/?=PHPB8B5F2A0-3C92-11d3-A3A9-4C7B08C10000
require 'sj'
run SinatraJekyll