I hereby claim:
- I am nathanielks on github.
- I am nathanielks (https://keybase.io/nathanielks) on keybase.
- I have a public key whose fingerprint is E5F6 FFB4 3651 D39A 25B9 1DAD FE02 07A3 8BD5 4DC4
To claim this, I am signing this object:
var seconds = 0; | |
$('.table.table-condensed .info-line small.duration').each(function(){ | |
var s = this.innerText.split(':'); | |
seconds += s[0] * 60; | |
seconds += s[1] * 1; | |
}); | |
console.log(seconds/60); |
Description: | |
I wrote this so that I could evenly distribute elements in a line. Here's an example that may explain better than words: http://cl.ly/JHnp, http://jsfiddle.net/nathanielks/pvGcz/4/. What it does it take the parent element and scans it for specific child elements. It then calculates the various widths and adds a left margin accordingly. The reason each element is given a display: block and float:left is because of a weird bug with display: inline. The script requires the elements to displayed inline initially, but because inline elements have a few extra pixels around them, the elements aren't all contained, even though the math is right. Really weird. Anyway, here's how you use it. | |
Usage: | |
$('#parent').distributeElements(); | |
Here's the demo: http://jsfiddle.net/nathanielks/pvGcz/4/ |
$(document).ready(function(){ | |
var center = new L.LatLng(-18.9717, -3.53815); // geographical point (longitude and latitude) | |
var map = new L.Map('map', { | |
scrollWheelZoom: false, | |
}).setView(center, 3); | |
var watercolor = new L.StamenTileLayer("watercolor").addTo(map); | |
var overlayUrl = '/path/to/image.png', |
<?php | |
add_action( 'after_setup_theme', 'bootstrap_setup' ); | |
if ( ! function_exists( 'bootstrap_setup' ) ): | |
function bootstrap_setup(){ | |
add_action( 'init', 'register_menu' ); | |
#!/usr/bin/php | |
<?php | |
$usage = "Automated Wordpress installer\nby Ali Gangji\nUsage: wordpress install_dir -u dbuser -p dbpass -d dbname\nOptions:\n"; | |
$usage .= " -u dbuser Database username\n"; | |
$usage .= " -p dbpass Database password\n"; | |
$usage .= " -d dbname Database name\n"; | |
$usage .= " -h dbhost Database host\n"; | |
$usage .= " --private Hide blog from search engines\n"; | |
$usage .= " --prefix prefix Database prefix\n"; | |
if ($argc < 2) { |
I hereby claim:
To claim this, I am signing this object:
# -*- mode: ruby -*- | |
# vi: set ft=ruby : | |
Vagrant.require_version '>= 1.5.1' | |
Vagrant.configure('2') do |config| | |
config.vm.box = 'roots/bedrock' | |
# Required for NFS to work, pick any local IP | |
config.vm.network :private_network, ip: '192.168.50.5' |
<?php | |
/* | |
* Plugin Name: wpMandrill MS | |
* Plugin URI: trepmal.com | |
* Description: Network-wide settings for wpMandrill. | |
* Version: 2013.04.01 | |
* Author: Kailey Lampert | |
* Author URI: kaileylampert.com | |
* License: GPLv2 or later | |
* TextDomain: wpmandrill-ms |