Skip to content

Instantly share code, notes, and snippets.

View gauravs's full-sized avatar

Gaurav Sharma gauravs

  • Sendoso
  • San Francisco
View GitHub Profile
@gauravs
gauravs / list1.txt
Created August 19, 2019 20:26
specialties
radiology-diagnostic
psychiatry
pediatrics
anesthesiology
orthopaedic-surgery
internal-medicine
immunology
anesthesiology
psychiatry
pediatrics
@gauravs
gauravs / vscompile.bat
Last active December 13, 2015 21:56
Lua Compile Windows
mkdir ..\bin
ren luaconf.h.orig luaconf.h
cl /MD /O2 /c /DLUA_BUILD_AS_DLL *.c
ren lua.obj lua.o
ren luac.obj luac.o
link /DLL /IMPLIB:lua5.2.lib /OUT:..\bin\lua5.2.dll *.obj
link /OUT:..\bin\lua.exe lua.o lua5.2.lib
@gauravs
gauravs / awesome-theme.lua
Last active August 4, 2016 17:32
#awesome #config
---------------------------
-- Default awesome theme --
---------------------------
theme = {}
theme.font = "sans 8"
theme.bg_normal = "#222222"
theme.bg_focus = "#535d6c"
@gauravs
gauravs / yaml_pp.sh
Last active August 4, 2016 17:33
#yaml #bash Pretty Print
alias yaml_pp='ruby -e "require \"json\"; require \"yaml\"; print JSON.parse(STDIN.read).to_yaml"'
@gauravs
gauravs / benchmark.rb
Last active December 1, 2024 14:12
#ruby #benchmark
#!/usr/bin/env ruby
require 'benchmark'
iterations = 1_000_000
Benchmark.bm do |bm|
# joining an array of strings
bm.report do
iterations.times do
["The", "current", "time", "is", Time.now].join(" ")
require 'benchmark'
n=100000
Benchmark.bm do |benchmark|
benchmark.report do
a=[]; n.times { a = a + [n] }
end
benchmark.report do
a=[]; n.times { a << n }
end