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
| defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool false | |
| defaults write NSGlobalDomain NSDocumentSaveNewDocumentsToCloud -bool true |
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 | |
| // Originally by Andrew Moore | |
| // Src: http://stackoverflow.com/questions/4795385/how-do-you-use-bcrypt-for-hashing-passwords-in-php/6337021#6337021 | |
| // | |
| // Heavily modified by Robert Kosek, from data at php.net/crypt | |
| class Bcrypt { | |
| private $rounds; | |
| private $prefix; |
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
| window.addEventListener('load', function(event) { | |
| // for each form on the page | |
| for(i=0; i < document.forms.length; i++) { | |
| f = document.forms[i]; | |
| // add a 'submit' event listener | |
| f.noValidate = true; | |
| // except for safari, the event never triggers without noValidate=true | |
| f.addEventListener('submit', function(event) { | |
| // if form is not valid don't let it submit | |
| if(!event.target.checkValidity()) { |
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
| if(is_dir($currentPath)) { | |
| ?><table class="file-list"><? | |
| $scan = scandir($currentPath); | |
| array_shift($scan); | |
| array_shift($scan); | |
| foreach($scan as $name) { | |
| if($name[0] != '.' && $name[0] != '_') { | |
| $path = $currentPath.'/'.$name; | |
| $icon = 'unknown'; | |
| if(is_dir($path)) { |
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
| PREPARE test AS | |
| WITH RECURSIVE T(n) AS ( | |
| SELECT date_trunc('month', $1::date)::date AS start | |
| UNION | |
| SELECT n+1 FROM T WHERE n < date_trunc('month', $1)::date + '1 month'::interval - '1 day'::interval | |
| ) | |
| SELECT * FROM T; | |
| EXECUTE test('15 nov 2012'); |
NewerOlder