This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<link rel="import" href="../google-map/google-map-search.html"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function typographyInfo( element ) | |
{ | |
var styles = getComputedStyle(element); | |
var props = ['font-family','font-size','line-height','margin-top','margin-bottom','padding-top','padding-bottom']; | |
console.log(element); | |
for( i in props ) | |
{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
toplevel = $('#subnav > ul > li > a'); | |
var all = []; | |
toplevel.each(function(i,x){ | |
//console.log(i, x); | |
var data = {}; | |
data.id = i + 500; | |
data.slug = x.href.split('#').pop(); | |
data.headline = $(x).text(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /bin/bash | |
TIMESTAMP=$(date +"%F") | |
BACKUP_DIR="./$TIMESTAMP" | |
MYSQL_USER="root" | |
MYSQL=mysql | |
MYSQL_PASSWORD="" | |
MYSQLDUMP=mysqldump | |
mkdir -p "$BACKUP_DIR" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jq = jQuery; | |
var collection = {}; | |
// change selector to * for everything use it to limit the kinds of nodes that get inspected. | |
jq('[name*=amenities]').each( | |
function(i,e){ | |
var found = jq('[id=' + e.id + ']'); | |
var count = found.length; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
How to find out in which SVN revision a file was deleted. | |
This will give you the revisions for all the actions (add, delete, remove, modify) concerning the file | |
svn log -v --limit <nr> -v | grep -E '<fileName>|^r' | grep -B 1 <fileName> | |
where: | |
<fileName> - the name of the file or any pattern which matches it | |
<nr> - how many revisions deep into the past in which I want to look for |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<link rel="import" href="../core-scaffold/core-scaffold.html"> | |
<link rel="import" href="../core-header-panel/core-header-panel.html"> | |
<link rel="import" href="../core-menu/core-menu.html"> | |
<link rel="import" href="../core-item/core-item.html"> | |
<link rel="import" href="../core-icon-button/core-icon-button.html"> | |
<link rel="import" href="../core-toolbar/core-toolbar.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-menu/core-submenu.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<link rel="import" href="../google-map/google-map-search.html"> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// When you would rather see an accurate number instead of a progress bar: | |
// http://jsbin.com/bomirabewa/2/edit?html,css,js,output | |
//----------------------------- | |
window.requestAnimationFrame(barmeasure); | |
function barmeasure() | |
{ | |
document.querySelector('title').innerText = document.querySelector('.i9Crcb').style.transform.replace('translateX(',''); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('*').each( function(index,element) | |
{ | |
if( getComputedStyle(element).position === 'absolute' ) | |
{ | |
console.log( element ) | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://codecombat.com/play/level/forgetful-gemsmith | |
// This function allows passing in a string of directions | |
// which will be converted into calls to the standard | |
// this.move____() functions. | |
this.moveSequence = function( instructions ) | |
{ | |
// Remove spaces from the instructions using a "greedy" Regular Expression. | |
var clean_instructions = instructions.replace( / /g, '' ); | |
OlderNewer