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
.jg .image img { | |
border: 1px solid silver; | |
padding: 4px; | |
width: 300px; | |
height: 300px; | |
} | |
.jg li { | |
opacity: .7; | |
border: 1px solid #999; | |
float: left; |
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
git stash; git checkout master; git pull; git checkout search; git merge master; git stash apply |
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 | |
$transport = new ElasticSearchTransportHTTP("localhost", 9200); | |
$search = new ElasticSearchClient($transport, "1311", "affiliates"); | |
$query = array( | |
'query' => array( | |
'bool' => array( | |
'must' => array( | |
array( | |
'query_string' => array( |
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 | |
class Photo extends \lithium\data\Model { | |
/** | |
* Generate a cached version under webroot | |
* @param string $id The image id as in mongodb | |
* @param array $options Possible values are | |
* width |
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 | |
Validator::add('array', function(&$value, $format = null, array $options = array()) { | |
$options += array( | |
'threshold' => 0, | |
'validator' => 'notEmpty' | |
); | |
if (is_array($value)) { | |
$failed = 0; | |
$valueCount = count($value); | |
foreach ($value as $item) { |
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
convert image.jpg profile.icc | |
convert image.jpg -profile profile.icc -profile /path/to/sRGB_IEC61966-2-1_black_scaled.icc -trim working-image.jpg |
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
var defaultTime = new Date(Date.now() + 3600 * 1000); | |
var hours = []; | |
for (var i = 0; i < 24; i++) | |
{ | |
hours.push({ | |
value : ("0" + i).slice(-2), | |
selected : (defaultTime.getHours() == i) | |
}); | |
} |
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 | |
$objects = array(new stdClass, new stdClass); | |
while ($o =& next($objects) && true) | |
var_dump($o); // stdClass object | |
reset($objects); | |
while ($o = next($objects) && true) | |
var_dump($o); // true | |
// Fix |
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
# ==== | |
# NOTE | |
# ==== | |
# This may be out of date; see the comments below. | |
# Arduino 0017 Makefile | |
# Arduino adaptation by mellis, eighthave, oli.keller, | |
# alex norman [with help from http://code.google.com/p/arduino/issues/detail?id=65#c5] | |
# Version 0017/Mac modifications made by | |
# David Wolever : http://dorkbotpdx.org/blog/ax/arduino_0017_makefile |
OlderNewer