#Fazal's list of dev tools
##JavaScript ###Node frameworks
###Polyfills
dependencies: | |
pre: | |
- gem install bundler |
class CSSCount | |
MAX_SELECTORS_DEFAULT = 4095 | |
# returns the specified split of the passed css_string | |
def self.split_string(css_string, split = 1, max_selectors = MAX_SELECTORS_DEFAULT) | |
rules = split_string_into_rules(css_string) | |
extract_part rules, split, max_selectors | |
end |
function countCSSRules() { | |
var results = '', | |
log = ''; | |
if (!document.styleSheets) { | |
return; | |
} | |
for (var i = 0; i < document.styleSheets.length; i++) { | |
countSheet(document.styleSheets[i]); | |
} | |
function countSheet(sheet) { |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'csv' | |
require 'sinatra' | |
get '/' do | |
csv = CSV.read("test.csv") | |
html = "<table> \n" | |
row_count = csv.count | |
csv.each_with_index do |row, row_position| |
#!/usr/bin/env ruby | |
require 'rubygems' | |
require 'bundler' | |
require 'fileutils' | |
require 'net/http' | |
require 'net/https' | |
require 'uri' | |
TMP_DIR = "/tmp/gems" |
(function($) { | |
$.fn.textfill = function(maxFontSize) { | |
maxFontSize = parseInt(maxFontSize, 10); | |
return this.each(function(){ | |
var ourText = $("a", this), | |
parent = ourText.parent(), | |
maxHeight = parent.height(), | |
maxWidth = parent.width(), | |
fontSize = parseInt(ourText.css("fontSize"), 10), | |
multiplier = maxWidth/ourText.width(), |
The rules are simple: