Skip to content

Instantly share code, notes, and snippets.

View alakra's full-sized avatar

Angelo Lakra alakra

View GitHub Profile

Keybase proof

I hereby claim:

  • I am alakra on github.
  • I am angelolakra (https://keybase.io/angelolakra) on keybase.
  • I have a public key whose fingerprint is 0246 6903 F7FE 9734 C1BE 29BB BC21 D80F 0071 996F

To claim this, I am signing this object:

@alakra
alakra / hearty_beef.md
Created October 14, 2013 20:03
Hearty Beef Chili

Hearty Beef Chili - Serves 4-6

+---------------------------------------------------------+-----------+--------+----------------------------------------------+
| name                                                    | quantity  | unit   | preparation                                  |
+---------------------------------------------------------+-----------+--------+----------------------------------------------+
| black bean, dark red kidneys or light red kidney beans  | 2 - 15-oz | cans   | any combination of beans, drained and rinsed |
| black pepper                                            | 1/4       | t      |                                              |
| chili powder                                            | 1 1/2     | T      |                                              |
| chipotle pepper                                         | 1         | t      |                                              |
@alakra
alakra / hogan_chili.md
Last active October 21, 2021 15:18
Hogan's White Chili (4 Variations)

Hogan's White Chicken Chili using Dried Beans - Serves 8

+-----------------------------------+----------+--------+--------------------+
| ingredients                       | quantity | unit   | preparation        |
+-----------------------------------+----------+--------+--------------------+
| black pepper                      |          |        |                    |
| boneless skinless chicken breasts | 2        | lbs    | cooked and chopped |
| chicken broth                     | 6        | c      |                    |
| chopped mild green chilies        | 8-oz     |        |                    |
@alakra
alakra / gist:5718900
Created June 6, 2013 02:26
ruby method lookups
params["username"]
is the same as
params.[]("username")
@alakra
alakra / gist:4534359
Created January 14, 2013 22:59
from dean keynote 2009 - google
Numbers Everyone Should Know
==============================
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns
Mutex lock/unlock 25 ns
Main memory reference 100 ns
Compress 1K bytes with Zippy 3,000 ns
Send 2K bytes over 1 Gbps network 20,000 ns
Read 1 MB sequentially from memory 250,000 ns
@alakra
alakra / gist:3915692
Created October 19, 2012 01:10
Oct 2012 - Hacknite Goals

Goals

  1. Get introduction to ncurses with ruby
  2. Learn about rugged - ruby binding to libgit2 which acts as an API to a git repository
  3. Refactor some code to make it a bit better
@alakra
alakra / gist:3183987
Created July 26, 2012 19:23
S-Expression compiler for Ladder Logic (version 2)
# luby2.rb --
#
# This file translates S-Expressions as a mark-up language into ladder
# logic which can be used by the Ladder Logic Editor by Sylva Control Systems.
#
# Copyright (c) 2008 RODI Systems, Inc.
#
# See the file "LICENSE" for more information on usage and redistribution of
# this file and for a DISCLAIMER OF ALL WARRANTIES.
@alakra
alakra / gist:3183982
Created July 26, 2012 19:22
S-Expression compiler for Ladder Logic (version 1)
# luby.rb --
#
# This file translates S-Expressions as a mark-up language into ladder
# logic which can be used by the Ladder Logic Editor by Sylva Control Systems.
#
# Copyright (c) 2006 RODI Systems, Inc.
#
# See the file "LICENSE" for more information on usage and redistrution of
# this file and for a DISCLAIMER OF ALL WARRANTIES.
@alakra
alakra / gist:2969961
Created June 22, 2012 03:12
PDF Generation from Ruby (using wkhtmltopdf)
class PDF
PATH = "#{Rails.root}/pdfs"
TMP_PATH = "#{Rails.root}/tmp/pdfs"
DEFAULT_OPTIONS = {
'footer-center' => 'Page [page]',
'footer-left' => "Mealr.net",
'footer-right' => "Copyright #{Time.now.strftime('%Y')}",
'margin-top' => '0.75in',