Skip to content

Instantly share code, notes, and snippets.

View kartikm's full-sized avatar
🏠
Working from home

Kartik Mistry kartikm

🏠
Working from home
View GitHub Profile
@jboner
jboner / latency.txt
Last active November 17, 2024 11:32
Latency Numbers Every Programmer Should Know
Latency Comparison Numbers (~2012)
----------------------------------
L1 cache reference 0.5 ns
Branch mispredict 5 ns
L2 cache reference 7 ns 14x L1 cache
Mutex lock/unlock 25 ns
Main memory reference 100 ns 20x L2 cache, 200x L1 cache
Compress 1K bytes with Zippy 3,000 ns 3 us
Send 1K bytes over 1 Gbps network 10,000 ns 10 us
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD
@santhoshtr
santhoshtr / gitstats
Created August 17, 2012 04:59
Git stats
# Number of contributors to the project
git log --pretty='%aN'|sort -u|wc -l
# Total commits made
git log --oneline | wc -l
# NUmber of lines written/modified
git log --stat|perl -ne 'END { print $c } $c += $1 if /(\d+) insertions/;'
# Top 5 contributos all time
@Nurdok
Nurdok / python_conversion.md
Last active July 11, 2024 15:00
Python Conversion

Python Number Conversion Chart

From To Expression
@desandro
desandro / jquery-layout-review.md
Created January 28, 2013 18:13
layout thrashing in jQuery
@postmodern
postmodern / comment.md
Last active January 11, 2024 15:37
Crypto Privacy Copy Pasta
@samyakbhuta
samyakbhuta / FreeTDIL.md
Last active December 16, 2015 16:49
Free TDIL. Possible licensing policy change for Technology Development for Indian Languages Programme.

Would like to know what are the steps/actions/policy-change needed to bring [TDIL's] (http://tdil-dc.in/) various works under free/opensource license? As I understand, TDIL is funded with tax-payer's money and ideally its output should be under public domain.

A case in point is [Sakal Bharati] (http://tdil-dc.in/index.php?option=com_up-download&task=view-download-tool&view=GET&toolid=805) font. They are not under any free/opensource license. See 'License Terms and Conditions' for 'Sakal Bharati' at the end. Due to the same, they cannot be distributed or placed as 'webfonts' - restricting its utility and usage to minimum.

Just like 'Sakal Bharati' many other products and technologies are not fully utilized for the want of open, participative and clear licensing policy. Any link or reference in this direction (to 'free' TDIL) would be of great help.

License Terms and Conditions for Sakal Bharati

License Terms and conditions
@creaktive
creaktive / rainbarf.zsh
Last active January 27, 2023 18:44
rainbarf sans tmux (to enable, "source rainbarf.zsh", under zsh)
# abort if already under tmux
[[ -n $TMUX_PANE ]] && return
# zsh-specific includes
zmodload -i zsh/datetime
zmodload -i zsh/stat
# place to store the chart
RAINBARF_OUT=~/.rainbarf.out
# update period, in seconds
@samyakbhuta
samyakbhuta / JavascriptReferences.md
Last active June 1, 2018 00:42
#javascript #reference
@samyakbhuta
samyakbhuta / merge-subsets.pe
Created November 14, 2013 12:20
Merge Subset of the font using Fontforge Native Script.
#!/usr/local/bin/fontforge
# Usage :
# ./merge-subsets.pe MyFont.ttf SubsettedGlyphs.ttf.subset
# This will create NewMyFont.ttf.
Open($1)
MergeFonts($2)
Generate("New" + $1:r + ".ttf")
@santhoshtr
santhoshtr / Webfonts.md
Last active August 10, 2016 08:01
Webfonts

Webfonts

Wikimedia wikis are available in around 300 languages. And the content in these wikis is a lot more than that. English wiki receives most of the traffic. But in English wiki also there are wiki pages with content fragments written in non-latin languages. Apart from wikipedia, sister projects like Wiktionary, Wikisource are also largely multilingual.

Latin script based languages does not face any serious issues with the availability of fonts in users computers to read content. But non-latin languages often face issues with reading content when the operating system does not have fonts or the fonts in the operating system is not upto date, bug free or aesthetically good.

Non-latin wiki pages often have a banner at the top of the page(Eg: See Malayalam wikipedia) asking people to visit a help page if they face reading issues. The help page contains download links to fonts and installation instruction for different operating systems.

For many languages, if the opera