.mixin (...) { // matches 0-N arguments
.mixin () { // matches exactly 0 arguments
.mixin (@a: 1) { // matches 0-1 arguments
.mixin (@a: 1, ...) { // matches 0-N arguments
.mixin (@a, ...) { // matches 1-N arguments
This file contains hidden or 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
WM3MBP:5.3.10 wilmoore$ pwd && ls etc{,.d} | |
/Users/wilmoore/local/php/versions/5.3.10 | |
etc: | |
total 192 | |
drwxr-xr-x 5 wilmoore staff 170B Feb 11 22:32 . | |
drwxr-xr-x 11 wilmoore staff 374B Feb 11 20:42 .. | |
-rw-r--r-- 1 wilmoore staff 1.5K Feb 11 20:43 pear.conf | |
-rw-r--r-- 1 wilmoore staff 21K Feb 11 20:42 php-fpm.conf.default | |
-rw-r--r-- 1 wilmoore staff 68K Feb 11 22:32 php.ini |
This file contains hidden or 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
{ "inline": | |
{ "unicode-support-in-js-today":"💩" | |
, "unicode-support-in-js-someday":"😁" } | |
, "surrogates": | |
{ "unicode-support-in-js-today":"\uf09f\u92a9" | |
, "unicode-support-in-js-someday":"\uf09f\u9881" } | |
} |
This file contains hidden or 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(d) { | |
var dl = d.createElement('a'); | |
dl.innerText = 'Download MP3'; | |
dl.href = "http://media.soundcloud.com/stream/"+d.querySelector('#main-content-inner img[class=waveform]').src.match(/\.com\/(.+)\_/)[1]; | |
dl.download = d.querySelector('em').innerText+".mp3"; | |
d.querySelector('.primary').appendChild(dl); | |
dl.style.marginLeft = '10px'; | |
dl.style.color = 'red'; | |
dl.style.fontWeight = 700; | |
})(document); |
This file contains hidden or 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
#!/usr/bin/env php | |
<?php | |
/* | |
* This file is part of Composer. | |
* | |
* (c) Nils Adermann <[email protected]> | |
* Jordi Boggiano <[email protected]> | |
* | |
* For the full copyright and license information, please view the LICENSE |
This file contains hidden or 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
// SEE: http://demos.flesler.com/jquery/scrollTo/ |
This file contains hidden or 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 | |
function filter_params(array $params = [], array $whitelist = []) { | |
return array_map('trim', array_intersect_key($params, array_flip($whitelist))); | |
} | |
$params = ['is_admin' => 1, 'name' => ' Bob', 'surname' => 'Smith ']; | |
$whitelist = ['name', 'surname']; | |
// these are your whitelisted parameters (please don't forget to filter/validate before persisting) |
This file contains hidden or 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
// breaks on 71st character -- breaking on 7x characters seems unreasonable | |
public function setAuthSubPrivateKeyFile($file, $passphrase = null, | |
$useIncludePath = false) { | |
This file contains hidden or 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 | |
// assume these preferences came from a database as-is | |
$userTimezonePreference = 'America/Denver'; | |
$userStoredDateTime = '2012-04-02 00:15:40'; | |
$dateTime = new DateTime($userStoredDateTime, new DateTimeZone($userTimezonePreference)); | |
echo 'ORIG: ', $dateTime->format(DateTime::RFC2822), PHP_EOL; | |
$dateTime->setTimezone(new DateTimeZone('UTC')); | |
echo 'USER: ', $dateTime->format(DateTime::RFC2822), PHP_EOL; |
This file contains hidden or 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
Today I gave a keynote at ACCU in Oxford. In the midst of it I made two (count them) two statements that I should have known better than to make. I was describing the late '70s, and the way we felt about the C language at the time. My slide said something like: "C was for real men." Emily Bache, whom I know and hold in high regard, spoke up and said "What about women?". And I said something like: "We didn't allow women in those days." It was a dumb crack, and should either not have been said, or should have been followed up with a statement to the effect that that was wrong headed. | |
The second mistake I made was while describing Cobol. I mentioned Adm. Grace Hopper. I said something like "May she rest in peace." I don't know that any of the words were actually demeaning, but the tone was not as respectful as it should have been to an Admiral in the United State Navy, and one who was so instrumental in our industry; despite what I feel about Cobol. | |
I am a 59 year old programmer who was brought up |