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
<section class="feed"> | |
<div class="feed__item"> | |
<div class="feed__item__image"> | |
<img src="https://pbs.twimg.com/profile_images/378800000703912809/95cb11a8f7c2832b5de07055e3ff66b2.png"> | |
</div> | |
<div class="feed__item__content"> | |
<h2>Marius Hauken</h2> | |
<p>Naming CSS-classes sucks, but it's worth doing properly and think a lot about!</p> | |
</div> | |
<time class="feed__item__desc">03.03</time> |
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
# The designer is dead, long live design | |
Design is a hotter subject than ever before. Apple is the most successful company in history, fueled by design, and the subsequent "design thinking" philosophy. | |
The concept of "design" is a far too important thing to be left to a designer. The designer is dead. | |
Long live design. | |
Design is a misunderstood practice, and one that I misunderstood for a long time myself. Being a developer – in itself a misunderstood practice for most as well – I long thought that we needed designers to design the stuff we were building. I expected upon the poor designers to produce blueprints for what we were building. | |
We often see clients reach out to us to buy a UX revamp, or some design touches, on their applications, websites or other visual properties. | |
Many think that the visual expression designed by the previous designer 5 years back is a replaceable skin with few ties into the application, or anything deeper. |
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 promiseGate(test) { | |
return function promiseGateResolver(value) { | |
return test(value).then(function(passedTest) { | |
if (!passedTest) throw new Error(test.name + ' failed'); | |
return value; | |
}) | |
} | |
}; | |
function checkLength(file) { |
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 |
OlderNewer