Skip to content

Instantly share code, notes, and snippets.

View vishaltelangre's full-sized avatar

Vishal Telangre vishaltelangre

View GitHub Profile
@vishaltelangre
vishaltelangre / uthavdar.tmTheme
Last active August 29, 2015 13:59
Sublime Text color theme - Uthavdar (उठावदार) [inspired from solarized dark design] #uthavdar
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<!-- @author Vishal Telangre -->
<!-- @copyright 2014 -->
<!-- @license MIT -->
<plist version="1.1">
<dict>
<key>name</key>
<string>Uthavdar</string>
<key>semanticClass</key>
@vishaltelangre
vishaltelangre / blur.css
Created April 17, 2014 09:34
cross browser blur filter using css
.blur {
-webkit-filter: blur(3px);
-moz-filter: blur(3px);
-ms-filter: blur(3px);
-o-filter: blur(3px);
/* FF doesn't support blur filter, but SVG */
filter: url("data:image/svg+xml;utf8,<svg height='0' xmlns='http://www.w3.org/2000/svg'><filter id='svgBlur' x='-5%' y='-5%' width='110%' height='110%'><feGaussianBlur in='SourceGraphic' stdDeviation='5'/></filter></svg>#svgBlur");
filter: progid: DXImageTransform.Microsoft.Blur(PixelRadius = '3');
filter: blur(3px);
}
@vishaltelangre
vishaltelangre / user.behaviors
Last active August 29, 2015 13:59
LightTable settings backup
;; User behaviors
;; -----------------------------
;; Behaviors are stored as a set of diffs that are merged together
;; to create the final set of functionality that makes up Light Table. You can
;; modify these diffs to either add or subtract functionality.
;;
;; Behaviors are added to tags, objects with those tags then automatically gain
;; whatever logic the behavior imparts. To see a list of user-level behaviors,
;; start typing a word related to the functionality you want in between the square
;; brackets (e.g. "theme").
@vishaltelangre
vishaltelangre / screenMatches.js
Last active August 29, 2015 13:59
responsive design helper function for javascirpt
/*
* Returns the different properties (Boolean) useful while responsive
* design.
*/
function screenMatches() {
var s = {};
if (window.matchMedia) {
/* Large desktop */
s.largeDesk = window.matchMedia("(min-width: 1200px)").matches;
/* Usual desktop */
@vishaltelangre
vishaltelangre / youtube-dl-aria
Created April 14, 2014 07:12
aria2 youtube download
# aria2c must be installed before moving on
sudo curl https://yt-dl.org/downloads/2014.04.04.2/youtube-dl -o /usr/local/bin/youtube-dl
sudo chmod a+x /usr/local/bin/youtube-dl
sudo curl https://raw.githubusercontent.com/tobbez/youtube-dl-aria/master/youtube-dl-aria -o /usr/local/bin/youtube-dl-aria
sudo chmod a+x /usr/local/bin/youtube-dl-aria
# Usage:
youtube-dl-aria --get-filename -o "%(title)s.%(ext)s" OWHJa0jKJgo
# ^
# |
@vishaltelangre
vishaltelangre / read_input.sh
Created April 9, 2014 20:02
Read user input #shell
echo "Do you think I am mad?"
read reply
echo $reply
@vishaltelangre
vishaltelangre / replace_every_char.jquery.js
Created April 8, 2014 12:21
Replace every character from a DOM node with desired character
function replaceEveryCharOf( selector, withChar, ignoreSpace ) {
$(selector).contents().filter(function() {
return this.nodeType == 3;
}).each(function(){
var regex = ignoreSpace ? /[^\s.]/g : /./g;
this.textContent = this.textContent.replace(regex, withChar);
});
}
// Usage:
@vishaltelangre
vishaltelangre / make_encrypt_decrypt.md
Last active January 26, 2018 10:29
encrypt/decrypt confidential file with CAST5 algorithm
  • Let's encrypt a file conf/config.json from current directory
  • Create a file named Makefile with following contents:
.PHONY: _pwd_prompt decrypt_conf encrypt_conf
 
CONF_FILE=conf/config.json
 
# 'private' task for echoing instructions
_pwd_prompt:
@vishaltelangre
vishaltelangre / demo.md
Last active August 29, 2015 13:56
jquery on example
@vishaltelangre
vishaltelangre / mr-marathi.mim
Created February 13, 2014 11:16
/usr/share/m17n/mr-marathi.mim #ibus #scim #phonetic #devnagari #linux #ubuntu
;; mr-marathi.mim -- Marathi Phonetic input method
;; Minor modifications in original "hi-baraha.mim" by vishaltelangre@gmail.com
;; for few Marathi character support.
;;
;; The MIT License (MIT)
;;
;; Copyright (c) 2011 Vishal Telangre
;;
;; Permission is hereby granted, free of charge, to any person obtaining a copy
;; of this software and associated documentation files (the "Software"), to deal