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
Number.prototype.pad = function(size) { | |
var s = String(this); | |
while (s.length < (size || 2)) {s = "0" + s;} | |
return s; | |
} | |
(1).pad(3) // => "001" | |
(10).pad(3) // => "010" | |
(100).pad(3) // => "100" |
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
Byobu Commands | |
============== | |
byobu Screen manager | |
Level 0 Commands (Quick Start) | |
------------------------------ | |
<F2> Create a new window |
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="../chart-js/chart-js.html"> | |
<link rel="import" href="../google-map/google-map-search.html"> | |
<link rel="import" href="../google-map/google-map-directions.html"> | |
<link rel="import" href="../google-map/google-map.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { |
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="../components/polymer/polymer.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.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
<link rel="import" href="../pp-barcode/pp-barcode.html"> | |
<polymer-element name="my-element"> | |
<template> | |
<style> | |
:host { | |
position: absolute; | |
width: 100%; | |
height: 100%; |
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-field/core-field.html"> | |
<link rel="import" href="../core-icon/core-icon.html"> | |
<link rel="import" href="../core-input/core-input.html"> | |
<link rel="import" href="../core-icons/core-icons.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
<?php /* Copyright(c) 2013 Robert Maupin. Released under the ZLIB License. */ | |
date_default_timezone_set('GMT'); | |
define('DB','chan.db'); | |
$max_image_size_kb = 1024*1024; | |
$thumbnail_size = 150; | |
$thumbnail_quality = 70; | |
$db = new PDO('sqlite:'.DB, 0, 0, array(PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION)); | |
function query($sql, $params = NULL) { | |
global $db; | |
$s = $db->prepare($sql); |
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
<?php /* Copyright(c) 2013 Robert Maupin. Released under the ZLIB License. */ | |
if(count($_FILES) > 0) { | |
extract($_FILES['file']); | |
list($w,$h,$type)=getimagesize($tmp_name); | |
/*see exif-imagetype() documentation :) */ | |
if(!$type||$type>3||filesize($tmp_name)>1024*200) | |
exit(); | |
$ext=image_type_to_extension($type,false); | |
$md5=md5_file($tmp_name); | |
move_uploaded_file($tmp_name,$n="img/$md5.$ext"); |
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
Index: domain_mapping.php | |
=================================================================== | |
--- domain_mapping.php (revision 646767) | |
+++ domain_mapping.php (working copy) | |
@@ -519,6 +519,10 @@ | |
} | |
function domain_mapping_siteurl( $setting ) { | |
+ // Don't redirect customizer requests | |
+ if ( isset( $_SERVER['HTTP_REFERER'] ) && false !== strpos( $_SERVER['HTTP_REFERER'], 'wp-admin/customize.php' ) ) |
NewerOlder