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 | |
global $current_user; | |
(is_object($current_user) && isset($current_user->user_login)) ? $html = '<input type="hidden" name="current_user" value="' . $current_user->user_login . '" />' : $html = '' ; | |
$html. = '<input type="submit" value="' . esc_attr( $value ) . '"' . $atts . ' />'; |
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 you work with git, you've probably had that nagging sensation of not knowing what branch you are on. Worry no longer! | |
export PS1="\\w:\$(git branch 2>/dev/null | grep '^*' | colrm 1 2)\$ " | |
# This will change your prompt to display not only your working directory but also your current git branch, if you have one. Pretty nifty! | |
# ~/code/web:beta_directory$ git checkout master | |
# Switched to branch "master" | |
# ~/code/web:master$ git checkout beta_directory | |
# Switched to branch "beta_directory" |
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
http://gigaom.com/2010/01/03/objectified-design/ | |
10 Rules of Good Design by Dieter Rams | |
1. Good design should be innovative | |
2. Good design should make a product useful | |
3. Good design is aesthetic design | |
4. Good design will make a product understandable | |
5. Good design is honest | |
6. Good design is unobtrusive |
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 | |
class simplenoteapi | |
{ | |
private $email; | |
private $token; | |
private $last_response; | |
private function socket_request ($http_method, $api_method, $data) | |
{ | |
$host = 'simple-note.appspot.com'; |
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
Howdy, | |
I have one issue which is rather strange, and one request which is rather not. | |
Often, when Growl tells me I have a new message, I'll open Notify and tap the spacebar. The preview window will open up, and it'll be blank, with just "(empty body)" displayed. | |
Since this has happened a number of times, and I can't reproduce it with any specific condition, but it just *happens*, I thought I'd report it and see what you make of it. | |
The request is rather simple: Make the window move, or stay put. |
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 rm_r($input) | |
{ | |
if (is_file($input)) | |
{ | |
return @unlink($input); | |
} | |
else if (is_dir($input)) | |
{ | |
$scan = glob(rtrim($input,'/').'/*'); |
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
test |
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 | |
/** | |
* Quick-and-dirty password generator, fully-commented edition ;) | |
* | |
* Author: Abraham Vegh <[email protected]> | |
*/ | |
// Our password generator, with a default length of eight | |
function random_password ($length = 8) | |
{ |
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
1. How do you put a giraffe into a refrigerator? | |
Stop and think about it and decide on your answer before you scroll down. | |
The correct answer is: Open the refrigerator, put in the giraffe, and close the door. This question tests whether you tend to do simple things in an overly complicated way. | |
2. How do you put an elephant into a refrigerator? | |
Did you say, Open the refrigerator, put in the elephant, and close the refrigerator? |
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 isset_and_is($a,$b,$c){$d=&$GLOBALS['_'.strtoupper($a)];return isset($d[$b])&&$d[$b]==$c;} |
OlderNewer