Skip to content

Instantly share code, notes, and snippets.

View leesharma's full-sized avatar

Lee Sharma leesharma

View GitHub Profile
@leesharma
leesharma / rescuetime-0.2.0.rb
Last active August 29, 2015 14:19
Lists all actions available in rescuetime v0.2.0
# Basics
@client = Rescuetime::Client.new
@client.api_key? #=> false
@client.valid_credentials? #=> false
@client.activities #=> Rescuetime::MissingCredentials
@client.api_key='invalid'
@client.api_key? #=> true
@client.valid_credentials? #=> false

# Nam metus neque massa nunc.

Aliquam sed lectus ut mauris. Mauris viverra odio sed leo.

  • Vivamus rutrum nunc nibh, eget.
  • Etiam congue laoreet est. Quisque.
  • Curabitur nisi arcu, ullamcorper vitae.
  • Nunc erat magna, molestie in!

Sed justo quam, scelerisque nec.

{
&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue">"esnext"</span>: <span class="green"><strong>true</strong></span>,
&nbsp;&nbsp;&nbsp;&nbsp;<span class="blue">"browser"</span>: <span class="green"><strong>true</strong></span>,
}
<h1>This is a header.</h1>
<p>Hello, world!</p>
<p class="red">Hello, world</p>
<p class="orange">Hello, world</p>
<p class="yellow">Hello, world</p>
<p class="green">Hello, world</p>
<p class="blue">Hello, world</p><br/><br/>
<img src="http://raptr.com/thumb/575/323/64e0d66b31eb88762d9187b941ab1ecd/?url=b9.raptrcdn.com%2Fimg%2Fscreenshots%2Forig%2Fa5d66d9e0f7c082fd6a2cfce590a63ad.0bf3fd3d4f731d5e2c5806a41d1e3400.jpeg&crop=0" alt="Temporary Skyrim screenshot" />
The MIT License (MIT)
Copyright (c) 2015 @leesharma and @secretofmana
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:
@leesharma
leesharma / simple_form_materialize-sass.rb
Last active October 25, 2015 15:14 — forked from mediasota/gist:7c46c8e105acc386d62f
config/initializers/simple_form_materialize-sass.rb
# Use this setup block to configure all options available in SimpleForm.
SimpleForm.setup do |config|
config.error_notification_class = 'alert alert-danger'
config.button_class = 'waves-effect waves-light btn'
config.boolean_label_class = nil
config.wrappers :vertical_form, tag: 'div', class: 'input-field', error_class: 'has-error' do |b|
b.use :html5
b.use :placeholder
b.optional :maxlength
@leesharma
leesharma / triangle_peg.rb
Created June 14, 2016 18:57 — forked from bokmann/triangle_peg.rb
An example from "What Computer Scientists Know: Thinking Recursively, Part 2. In this example we are going to explore how we use our newfound knowledge of recursion to search through all the solutions of a simple puzzle using recursive backtracking.
# This is a programming chellenge from David Bock's series
# "What Computer Scientists Know". This is a problem that can
# be used to discuss a bunch of computer science topics, but
# as I'm providing most of the skeleton of the solution, the
# point of this exercise is to demonstrate 'recursive backtracking'.
# http://en.wikipedia.org/wiki/Backtracking
# this problem is based on the classic 'triange peg game', a common
# sight in roadside diners in America, in particular, Cracker
@leesharma
leesharma / pwldc-meetup.md
Last active July 2, 2016 18:22
A draft description for the Papers We Love DC/NoVA meetup group

What is this group?

What was the last paper within the realm of computing you read and loved? What did it inspire you to build or tinker with? Come share the ideas in an awesome academic/research paper with fellow engineers, programmers, and paper-readers. Lead a session and show off code that you wrote that implements these ideas or just give us the lowdown about the paper. Otherwise, just come, listen, and discuss.

Find us:

@leesharma
leesharma / matching_bound_variables.exs
Last active August 13, 2016 06:21
What is the best practice for matching against bound variables?
ExUnit.start
defmodule DateParser do
defmodule Timezone, do: defstruct [:full_name, :source]
@doc """
`timezone/2` takes a date/datetime string and a global time zone and returns
a time zone for the specific string. Timezones specified inline should take
priority over the passed-in global timezone.
"""

April 2017

Here is a calendar, written in HTML + GitHub-Flavored Markdown. The code is pretty messy, but it's functional.

Monday Tuesday Wednesday Thursday Friday Saturday Sunday










1
[C][20170401]
2
[C][20170402]
3
[tmux][20170403]
4
[vim][20170404]
5
[elixir][20170405]
6
[elixir][20170406]
7
[elixir][20170407]
8
[git][20170408]
9
[erlang][20170409]
10 11 12 13 14 15 16