Skip to content

Instantly share code, notes, and snippets.

View nishad's full-sized avatar
🐢
I may be slow to respond.

Nishad Thalhath nishad

🐢
I may be slow to respond.
View GitHub Profile
<?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; ?>
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
# 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>
// 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 = "address@test.com";
<?php
#Pages have these fields, they can have comma separated values for group, category and option
# Title: Event1
# ----
# Group: Group1
# ----
# Category: Cat2
# ----
# Option: Option1
<?php
#Pages have these fields, the can have comma separated values for group, category and option
# Title: Event1
# ----
# Group: Group1
# ----
# Category: Cat2
# ----
#!/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 ~
@nishad
nishad / smaple.php
Last active August 29, 2015 14:23 — forked from laiso/smaple.php
<?php
/**
* Exite翻訳(英語→日本語)の野良API サンプル
*/
$text = 'This is a pen.';
$to = 'ENJA'; // ENJA or JAEN
$q = http_build_query(array(
'_id' => '6855579bdcb52e1a0a3822af4b5a9c88',
#!/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)"')