Skip to content

Instantly share code, notes, and snippets.

View hkarthik's full-sized avatar

Karthik Hariharan hkarthik

  • Goodwater Capital
  • San Francisco, CA
  • X @hkarthik
View GitHub Profile
@prettyirrelevant
prettyirrelevant / app.py
Last active July 4, 2023 00:55
Using Huey with Flask using application factory. For configuration, follow the djhuey format
# Due to the flexible nature of Flask. This might be __init__.py
from .extensions import huey
def create_app():
app = Flask(__name__)
# add your configurations
# app.config.from_object("settings.local")
huey.init_app(app)
@jewelia
jewelia / gist:595200aae5f9a437a634
Last active August 29, 2015 14:12
Books: 2014 retrospective and to-read for 2015

Many of my friends have shared their reading lists of all the books they read in 2014 (thank you!) -- this gave me some excellent ideas of books to read for 2015.

So I have decided to share my reading list as well, and the list of books I plan to read in 2015. If you have any ideas for additional books, I'd love them (especially in the topic areas of business, finance, nonfiction).

Favorite books I read in 2014:

  • The Hard Thing About Hard Things: Building a Business When There Are No Easy Answers by Ben Horowitz
  • The Everything Store: Jeff Bezos and the Age of Amazon by Brad Stone
  • The Effective Executive: The Definitive Guide to Getting the Right Things Done by Peter F Drucker
  • Zero to One: Notes on Startups, or How to Build the Future by Peter Thiel
%% Disable SSLv3.0 support
[
{ssl, [{versions, ['tlsv1.2', 'tlsv1.1', tlsv1]}]},
{rabbit, [
{ssl_listeners, [5671]},
{ssl_options, [{cacertfile,"/path/to/ca_certificate.pem"},
{certfile, "/path/to/server_certificate.pem"},
{keyfile, "/path/to/server_key.pem"},
{versions, ['tlsv1.2', 'tlsv1.1', tlsv1]}
]}
#Count the lines of Ruby code in your app
find . -iname "*.rb" -type f -exec cat {} \; | wc -l
@maxim
maxim / rails_load_path_tips.md
Last active April 13, 2023 13:28
How to use rails load paths, app, and lib directories.

In Rails 3

NOTE: This post now lives (and kept up to date) on my blog: http://hakunin.com/rails3-load-paths

If you add a dir directly under app/

Do nothing. All files in this dir are eager loaded in production and lazy loaded in development by default.

If you add a dir under app/something/

Ruby Infrastructure Engineer, San Francisco, California

Hi, I'm Ben. I'm the lead engineer of the infrastructure team at Zendesk.

I'm looking for a passionate and talented ruby engineer to join our infrastructure team in San Francisco. Who are we? We are the hackers behind the scenes -- we build the services and struts that the rest of Zendesk builds good product on top of. We like solving hard problems, fixing deep bugs, and doing it at scale. We'll try out new technologies, but love technology that delivers on its promises. We feel confident when we press the enter key. We're a team of good generalists who like learning the stack well enough to be considered a specialist.

Some of what we've been up to recently.

Make it real

Ideas are cheap. Make a prototype, sketch a CLI session, draw a wireframe. Discuss around concrete examples, not hand-waving abstractions. Don't say you did something, provide a URL that proves it.

Ship it

Nothing is real until it's being used by a real user. This doesn't mean you make a prototype in the morning and blog about it in the evening. It means you find one person you believe your product will help and try to get them to use it.

Do it with style

# The session name should have been passed in, but if not
# default to 'default-session-name'
session=${1-"default-session-name"}
# Create and name some windows.
tmux rename-window -t $session:1 bash
tmux new-window -t $session:2 -n webserver
tmux new-window -t $session:3 -n python
tmux new-window -t $session:4 -n templates
tmux new-window -t $session:5 -n js
anonymous
anonymous / imagemagick_brew.sh
Created December 19, 2012 11:49
How to downgrade imagemagick with brew if you have issues with rmagick gem
brew uninstall imagemagick
cd /usr/local/Cellar
git checkout 834ce4a /usr/local/Library/Formula/imagemagick.rb
brew install imagemagick
@mbbx6spp
mbbx6spp / README.md
Created June 25, 2012 04:37
PostgreSQL configuration settings guidelines when starting out with PostgreSQL.

PostgreSQL configuration settings

Basics

  • Just run PostgreSQL on the host
  • Prefer bare metal when you have more serious DB needs
  • Disable the Linux OutOfMemory killer (see #3)

Memory config guidelines