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
Verifying my Blockstack ID is secured with the address 17Qd1UmHZpdmNPhwFenAPTSJqTXWBookFJ https://explorer.blockstack.org/address/17Qd1UmHZpdmNPhwFenAPTSJqTXWBookFJ |
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
0x50dAc4CFd68C4166E01354783E4B4b8BfAc13757 |
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
# Add to your ~/.bashrc | |
# Usage: sgrep <mysearch> . | |
# Use from the root of your Symfony2 project | |
alias sgrep="grep -r --exclude-dir=vendor --exclude-dir=app/cache --exclude-dir=app/logs" |
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
Auto-filling Array Keys | |
======================= | |
var foo = new Array(); | |
foo[500] = 'bar'; | |
console.log(foo.length); // 501 | |
// And it gets worse: |
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 | |
# | |
# Test script to test bashes handling of re-assigned arrays | |
FOO[0]='foo'; | |
FOO[1]='bar'; | |
BAR=$FOO | |
echo "Loop main 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
Why does count(false) == 1 in PHP? | |
---------------------------------- | |
If you have ever been caught out by doing if (count($var)) and wondered why this | |
passes when a previous assignment failed and set this to false, the reason is | |
actually quite simple. count() was designed to be used with arrays, and so values | |
are always cast to an array internally before checking the number of elements. If | |
you cast a boolean to an array it will be come an array with one element set to the | |
value of the boolean. See: |
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
fadeIn rendering bug (background image) | |
--------------------------------------- | |
I was experiencing an issue in Chrome and Internet Explorer where intermittently the | |
background image would fail to load after a a fadeIn. Narrowed this down to a rendering | |
issue rather than a logic error and was able to fix it by resetting the background image | |
after the fade like so: | |
$('#wrapper').css('background', $('#wrapper').css('background')); |
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 5.3 namespaces have taken away the biggest advantage of autoloading | |
----------------------------------------------------------------------- | |
When autoloading was introduced into PHP, the PHP world rejoiced as we no | |
longer needed to require every class we wanted to use in our current file | |
at the top of our code. With the introduction of namespaces this advantage | |
has been completely reversed, where unless you are writing all your code in | |
a single namespace (unlikely) you will end up needing to "use" every class | |
you want to include. |
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
%g/[^[:print:][:tab:]]/d |
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
Ctrl+v Ctrl+i |