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 $years = array(); $months = array(); ?> | |
<?php if(has_posts()): while(posts()): ?> | |
<?php $y = date('Y', article_time()); $m = date('F', article_time()); ?> | |
<?php if( ! in_array($y, $years)): $years[] = $y; ?> | |
<h1><?php echo $y; ?></h1> | |
<?php endif; ?> |
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
sub, sup { | |
/* Specified in % so that the sup/sup is the | |
right size relative to the surrounding text */ | |
font-size: 75%; | |
/* Zero out the line-height so that it doesn't | |
interfere with the positioning that follows */ | |
line-height: 0; | |
/* Where the magic happens: makes all browsers position |
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 csv_to_array | |
* @link http://gist.github.com/385876 | |
* @author Jay Williams <http://myd3.com/> | |
* @copyright Copyright (c) 2010, Jay Williams<?php */?> | |
<?php | |
$imagelist= $page->imagelist(); | |
if ($imagelist != ''){ | |
function csv_to_array($filename='', $delimiter=',') { |
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
# Installation | |
curl -o laravel.phar http://laravel.com/laravel.phar | |
chmod 755 laravel.phar | |
mv laravel.phar /usr/local/bin/laravel | |
# Usage | |
laravel new <application_name> |
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
// Send Email | |
require_once 'Mandrill.php'; | |
$mandrill = new Mandrill($apikey); | |
$message = new stdClass(); | |
$message->html = "html message"; | |
$message->text = "text body"; | |
$message->subject = "email subject"; | |
$message->from_email = "[email protected]"; |
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 | |
#Pages have these fields, they can have comma separated values for group, category and option | |
# Title: Event1 | |
# ---- | |
# Group: Group1 | |
# ---- | |
# Category: Cat2 | |
# ---- | |
# Option: Option1 |
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 | |
#Pages have these fields, the can have comma separated values for group, category and option | |
# Title: Event1 | |
# ---- | |
# Group: Group1 | |
# ---- | |
# Category: Cat2 | |
# ---- |
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
#!/bin/bash | |
# Install csvkit with csvpys | |
# (csvpys hasn't been pulled back into the main csvkit repo that you can pip install) | |
git clone https://github.com/cypreess/csvkit.git | |
cd csvkit | |
python setup.py build | |
sudo python setup.py install | |
cd ~ |
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 | |
/** | |
* Exite翻訳(英語→日本語)の野良API サンプル | |
*/ | |
$text = 'This is a pen.'; | |
$to = 'ENJA'; // ENJA or JAEN | |
$q = http_build_query(array( | |
'_id' => '6855579bdcb52e1a0a3822af4b5a9c88', |
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
#!/bin/python | |
import requests | |
import re | |
def start(): | |
chapter_links=[] | |
course="http://try.jquery.com/" | |
response=requests.get(course) | |
chapter_pattern=re.compile(r'(http[s]?://try.jquery.com/levels/\d)"') |
OlderNewer