Skip to content

Instantly share code, notes, and snippets.

View arulprasad's full-sized avatar

Arul Prasad arulprasad

View GitHub Profile
@arulprasad
arulprasad / Keybase.md
Created July 11, 2019 04:51
Keybase validation

Keybase proof

I hereby claim:

  • I am arulprasad on github.
  • I am arulprasad (https://keybase.io/arulprasad) on keybase.
  • I have a public key ASC65G0swuTxucFH4zDW8fnTiuXtzT17IZYco5Bv76l9Nwo

To claim this, I am signing this object:

@arulprasad
arulprasad / gen_md5.html
Created November 30, 2015 20:11
generate md5 for a file using CryptoJS
<html>
<head>
<title>Get MD5 for a file</title>
<script src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/md5.js"></script>
<script type="text/javascript">
function onFileSelect(){
var reader = new FileReader();
@arulprasad
arulprasad / gist:5431939
Created April 22, 2013 01:50
normalize html canvas for retina displays
// from https://github.com/subprotocol/verlet-js/blob/master/examples/shapes.html
var dpr = window.devicePixelRatio || 1;
canvas.width = width*dpr;
canvas.height = height*dpr;
canvas.getContext("2d").scale(dpr, dpr);
http://i.imgur.com/4jjBF.jpg
http://i.imgur.com/eangq.jpg
http://i.imgur.com/iskCi.jpg
http://i.imgur.com/NNHwX.jpg
http://i.imgur.com/DxKUT.jpg
http://i.imgur.com/RY7Sh.jpg
http://i.imgur.com/eumJa.jpg
http://i.imgur.com/3BULC.jpg
http://i.imgur.com/pUgaV.jpg
http://i.imgur.com/RJUX6.jpg
@arulprasad
arulprasad / gist:1250333
Created September 29, 2011 08:52
c250 printer driver location
http://onlinesupport.fujixerox.com/tiles/common/hc_drivers_download.jsp?system=Macintosh%20OS%20X&shortdesc=Mac%20OS%20X%2010.5%20/%2010.6%20Driver&xcrealpath=ftp://ftp.fxa.com.au/drivers/APCIII7600/101941-mac105ps.dmg
s = Store.find_by_code('landscape'); inventories = Item.where("id NOT IN (?)", s.inventories.collect(&:item_id)).collect {|i| s.inventories.create!(:item_id => i.id, :quantity => 100) }; inventories.class