Skip to content

Instantly share code, notes, and snippets.

Avatar
:octocat:
Building stuff...

Varun Malhotra softvar

:octocat:
Building stuff...
View GitHub Profile
View pb
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC3d0NgLvKUJudVqVUMG0mgTHfAsGk7A+DWiIe5lyE98u5QB3qyxgrYv+t3ly6Pf0wXDzxLMhsbh2Z3TZe/YP1PTMd8RZhVD4OPsze+UWxZ+f1zb4DrbE/ntuzU18SgmoJVjXpgdEw4pBW0T99Wz5SxLTtxQjb7p7pFWgvxhc5tSoZomHKT3GkyzszpaBb+pASxAq+p4WgF5oYK9q+c9H0c76ns8YpndQihktVFZz8rsMdgGVXecmyERTvr+agK2uoKYSXHtRLHiyvJa+/Ay0F85FCum6mIItuMUfKT9ZhdnDtxg8A4wcI7pGZc6aiV2SOD3xe85Pz35Tf0tVtEC9sZ varun2902@gmail.com
View pushcrew.js
var env=location.search.split('env=')[1] ? location.search.split('env=')[1] : 'pushcrew';
var account_hash=location.search.split('hash=', 32)[1] ? location.search.split('hash=', 32)[1] : '9124e552b5bae794f8d75b23813e9d84';
if (account_hash.indexOf('&') > 0) {
account_hash = account_hash.split('&')[0];
}
(function(p,u,s,h){
p._pcq=p._pcq||[];
p._pcq.push(['_currentTime',Date.now()]);
s=u.createElement('script');
s.type='text/javascript';
@softvar
softvar / pr.md
Created Aug 5, 2018 — forked from piscisaureus/pr.md
Checkout github pull requests locally
View pr.md

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = git@github.com:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

View jQuery-1.6.4
/*!
* jQuery JavaScript Library v1.6.4
* http://jquery.com/
*
* Copyright 2011, John Resig
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Includes Sizzle.js
* http://sizzlejs.com/
View bitbar-plugin-github-repos-stars-count.10m.sh
#!/usr/local/bin/node
/* Github repos stars count and Emoji on change :)
* BitBar plugin
*
* by Varun Malhotra
* (c) 2015
* LICENSE - MIT
*
* Shows current stars count of each repo and 🔔 on change
View bitbar-plugin-producthunt-posts-votes-count.10m.sh
#!/usr/local/bin/node
/* ProductHunt posts upvotes count and Emoji on change :)
* BitBar plugin
*
* by Varun Malhotra
* (c) 2016
* LICENSE - MIT
*
* Shows current votes count of each post and notification bell (🔔) on change
View hostReachable.js
function hostReachable() {
// Handle IE and more capable browsers
var xhr = new ( window.ActiveXObject || XMLHttpRequest )( "Microsoft.XMLHTTP" );
var status;
// Open new request as a HEAD to the root hostname with a random param to bust the cache
xhr.open( "HEAD", "//" + window.location.hostname + "/?rand=" + Math.floor((1 + Math.random()) * 0x10000), false );
// Issue request and handle response
@softvar
softvar / main.py
Created May 30, 2013
diagrammer - changes in main.py for connections
View main.py
import kivy
kivy.require('1.6.0')
import random
from kivy.app import App
from kivy.graphics import Color, Ellipse, Line, Rectangle
from kivy.properties import ListProperty, ObjectProperty
from kivy.uix.gridlayout import GridLayout
from kivy.uix.image import Image
@softvar
softvar / Test.kv
Last active Dec 17, 2015
testing touch events
View Test.kv
#:kivy 1.0
#:import kivy kivy
#:import win kivy.core.window
<cont>:
but: but
FloatLayout:
size:(600,600)
Button: