Skip to content

Instantly share code, notes, and snippets.

@Srikanth-AD
Srikanth-AD / csscss-verbose
Created December 29, 2014 16:59
csscss verbose command
csscss -n 5 -v custom.css
@Srikanth-AD
Srikanth-AD / open-jira-ticket-url
Created November 15, 2014 21:20
Bookmarklet to open Jira ticket URL by ticket number
javascript: (function(){var ticketnumber = prompt("Enter ticket number without prefix", "");if (ticketnumber != null) {window.location = "https://loxabeauty.atlassian.net/browse/LTWO-" + ticketnumber;}})();
@Srikanth-AD
Srikanth-AD / workflowy-sp-calc-min
Created October 6, 2014 21:26
workflowy story points calc - minimized version
javascript:(function(){var allTagText=jQuery('.contentTagText:contains("SP")').text();var doneTagText=jQuery('.done .contentTagText:contains("SP")').text();var numberPattern=/\d+/g;var allSprintStoryPoints=allTagText.match(numberPattern);var allCount=0;var doneCount=0;for(var i=0;i<allSprintStoryPoints.length;i++){allCount+=parseInt(allSprintStoryPoints[i])};var doneSprintStoryPoints=doneTagText.match(numberPattern);if(doneTagText.length>0){for(var i=0;i<doneSprintStoryPoints.length;i++){doneCount+=parseInt(doneSprintStoryPoints[i])}}else{doneCount=0}alert('Total: '+allCount+' '+' Pending: '+(parseInt(allCount)-parseInt(doneCount))+' Complete: '+doneCount)}());
@Srikanth-AD
Srikanth-AD / workflowy-story-point-calc
Last active September 19, 2018 02:17
Bookmarklet - workflowy story point calculator
javascript: (function() {
var allTagText = jQuery('.contentTagText:contains("SP")').text();
var doneTagText = jQuery('.done .contentTagText:contains("SP")').text();
var numberPattern = /\d+/g;
var allSprintStoryPoints = allTagText.match(numberPattern);
var allCount = 0;var doneCount = 0;
for (var i = 0; i < allSprintStoryPoints.length; i++) {
allCount += parseInt(allSprintStoryPoints[i])
};
var doneSprintStoryPoints = doneTagText.match(numberPattern);
@Srikanth-AD
Srikanth-AD / bookmarklet-canonical-url
Created September 25, 2014 15:27
Bookmarklet - view canonical URL of current page
javascript: (function(){var e=document.location;var t=document.getElementsByTagName("link");var n="none";for(var r=0,i;i=t[r];r++){if(i.getAttribute("rel")=="canonical"){n=i.getAttribute("href");break}}alert("Canonical URL:\n" + n)})();
javascript: (function(){var e=document.location;var t=document.getElementsByTagName("link");var n="none";for(var r=0,i;i=t[r];r++){if(i.getAttribute("rel")=="canonical"){n=i.getAttribute("href");break}}alert("Canonical URL:\n" + n)})();
@Srikanth-AD
Srikanth-AD / fill billing address magento
Created December 17, 2013 17:31
Bookmarklet: Fill billing address in Magento Checkout (jQuery dependency)
javascript:(function(){jQuery('#billing\\:firstname').val('test');jQuery('#billing\\:lastname').val('test');jQuery('#billing\\:email').val('test@loxabeauty.com');jQuery('#billing\\:street1').val('test');jQuery('#billing\\:city').val('test');jQuery('#billing\\:postcode').val('45324');jQuery('#billing\\:telephone').val('111');jQuery('#billing\\:region_id').val(47);jQuery('#billing\\:region_id').val(47).attr("selected", "selected");})();
@Srikanth-AD
Srikanth-AD / permutationsString.js
Created March 13, 2013 16:14
All permutations for a given string
var tree = function(leafs) {
var branches = [];
if( leafs.length == 1 ) return leafs;
for( var k in leafs ) {
var leaf = leafs[k];
tree(leafs.join('').replace(leaf,'').split('')).concat("").map(function(subtree) {
branches.push([leaf].concat(subtree));
});
}
return branches;
@Srikanth-AD
Srikanth-AD / Gemfile
Created June 21, 2012 21:54 — forked from dvessel/README.mdown
Sass+Compass, Guard, LiveReload
# ~/Gemfile
source "http://rubygems.org"
group :development do
gem 'compass' # Depends on Sass, will be installed automatically.
gem 'compass-960-plugin' # 960.gs
gem 'compass-validator' # So you can `compass validate`.
gem 'oily_png' # Faster Compass sprite generation.
gem 'css_parser' # Helps `compass stats` output statistics.