Skip to content

Instantly share code, notes, and snippets.

Avatar
🌟
Building Altair

Bryan Veloso bryanveloso

🌟
Building Altair
View GitHub Profile
@bryanveloso
bryanveloso / vercel-monorepo.MD
Created Apr 10, 2021 — forked from clodal/vercel-monorepo.MD
Setting Up Vercel Monorepo
View vercel-monorepo.MD

Vercel Monorepo

Why?

  1. Code sharing: xxx-web project can directly access files and variables in xxx-api project vice versa. No need for a private npm module (i.e. @onextech/ens-api) for code sharing.
  2. Integrated: Only 1 git repository to check-in to. No need to split across web and api, etc.

Benefits

  1. Linked dependencies (i.e. node_modules) via Yarn Workspaces
  2. Aliased imports (i.e. @app/web/src/*)
@bryanveloso
bryanveloso / brew-services.rb
Created Dec 8, 2011 — forked from lwe/brew-services.rb
External script for homebrew to simplify starting services via launchctl, out of the box support for any formula which implements #startup_plist. (This version fixes the deprecation warning raised on Formula.resolve_alias.)
View brew-services.rb
#!/usr/bin/env ruby -w
# brew-services(1) - Easily start and stop formulas via launchctl
# ===============================================================
#
# ## SYNOPSIS
#
# [<sudo>] `brew services` `list`<br>
# [<sudo>] `brew services` `restart` <formula><br>
# [<sudo>] `brew services` `start` <formula> [<plist>]<br>
View clients.md

Gist Clients

Want to create a Gist from your editor, the command line, or the Services menu? Here's how.

Editor Support

View Campfire Client.mkdn

Campfire client

A simple campfire client similar to Propane for OSX.

Wanted Features

  • Ability to stay logged into multiple rooms with unread counts
  • Noise / notification when people mention my name or listed aliases (Kyle, kneath, etc)
  • Upload / paste in images
  • Username completion
@bryanveloso
bryanveloso / general_python_reqs.txt
Created Mar 19, 2010 — forked from toastdriven/general_python_reqs.txt
The Python packages I install globally.
View general_python_reqs.txt
cherrypy
coverage
Cython
python-dateutil
distribute
docutils
eventlet
fabric
greenlet
gunicorn
@bryanveloso
bryanveloso / pip.conf
Created Mar 10, 2010 — forked from jezdez/pip.conf
Sample pip configuration file.
View pip.conf
[global]
default-timeout = 60
respect-virtualenv = true
download-cache = /tmp
log-file = /tmp/pip-log.txt
[install]
find-links =
http://pypi.pinaxproject.com
http://pypi2.pinaxproject.com
We couldn’t find that file to show.
View gist:320270
"Memcached cache backend"
from django.core.cache.backends import memcached
from django.utils.encoding import smart_unicode, smart_str
MIN_COMPRESS_LEN = 150000
class CacheClass(memcached.CacheClass):
def add(self, key, value, timeout=None, min_compress_len=MIN_COMPRESS_LEN):
if isinstance(value, unicode):
View test-coverage.py
#!/usr/bin/env python
"""
Run Django Tests with full test coverage
This starts coverage early enough to get all of the model loading &
other startup code. It also allows you to change the output location
from $PROJECT_ROOT/coverage by setting the $TEST_COVERAGE_OUTPUT_DIR
environmental variable.
"""
View ratelimit.js
/* Use this to cause a function to fire no more than once every 'ms' milliseconds.
For example, an expensive mousemove handler:
$('body').mouseover(ratelimit(function(ev) {
// ...
}, 250));
*/
function ratelimit(fn, ms) {
var last = (new Date()).getTime();