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 Cat | |
{ | |
protected $name; | |
public function getName() | |
{ | |
return $this->name; | |
} |
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 | |
require_once 'Net/Socket/Tiarra.php'; | |
$api_uri = 'http://www.facebook.com/feeds/api_status.php'; | |
$db = __DIR__ . '/log.sqlite'; | |
$pdo = new PDO("sqlite:$db"); | |
$tiarra_socket = 'riaf'; | |
$irc_channel = '#nequal@freenode'; | |
$last_row = $pdo->query('SELECT * FROM log ORDER BY created_at DESC')->fetch(PDO::FETCH_ASSOC); |
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 | |
require_once __DIR__ . '/path/to/src/Selfish/Loader.php'; | |
Selfish\Loader::register(); | |
use Selfish\iCalendar\iCalendar; | |
use Selfish\iCalendar\Component\Event; | |
use Selfish\iCalendar\Component\Timezone; | |
$ical = new iCalendar(); | |
$ical->addComponent(new Timezone); |
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/sh | |
CPU_USAGE=`ps aux | grep Growl.app | sed -e 's/ */ /g' -e 's/ /=/g' -e ' 2d' | cut -d '=' -f 3 | cut -d '.' -f 1` | |
if [ $CPU_USAGE -gt 20 ]; then | |
killall Growl | |
open /Applications/Growl.app | |
fi |
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 | |
require_once '/path/to/selfish/src/Selfish/Loader.php'; | |
Selfish\Loader::register(); | |
use Selfish\Service\Redmine\Connection; | |
use Selfish\Service\Redmine\Issues; | |
$redmine_connection = new Connection('http://redmine.example.com/'); | |
$redmine_connection->setApiKey('redmine-api-access-token'); | |
// $redmine_connection->setBasicAuth('member', 'password'); |
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
.clearfix:after { | |
content: "."; | |
display: block; | |
clear: both; | |
height: 0; | |
visibility: hidden; | |
} | |
.clearfix { | |
min-height: 1px; |
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
user_about_me | |
user_activities | |
user_birthday | |
user_checkins | |
user_education_history | |
user_events | |
user_groups | |
user_hometown | |
user_interests | |
user_likes |
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 | |
if ($_POST) { | |
return header('Location: tel://xxxxxxxxxxx'); | |
exit(); | |
} | |
?> | |
<form action="" method="post" name="telform"> |
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 | |
/** | |
* spaceless helper | |
* | |
* @author Keisuke SATO <[email protected]> | |
*/ | |
function spaceless() | |
{ | |
ob_start(); |
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 | |
function getCalendar($date) { | |
if ($date instanceof DateTime === false) { | |
$date = new DateTime($date); | |
} | |
$sdate = clone $date; | |
$sdate->modify('first day of'); |