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
/**
* cURL
*
* @author CertaiN
* @github https://github.com/Certainist/cURL
* @license BSD 2-Clause
*/
class cURL implements Serializable {
@nishad
nishad / keybase.md
Created August 12, 2016 18:56
Keybase proof

Keybase proof

I hereby claim:

  • I am nishad on github.
  • I am rimpo (https://keybase.io/rimpo) on keybase.
  • I have a public key whose fingerprint is CD72 736D C01E A219 130C 3AB4 1E06 BB9E B6F5 1A54

To claim this, I am signing this object:

@nishad
nishad / test-curl.php
Created July 13, 2016 23:22
Simple Curl PHP Example
function curl_download($Url){
// is cURL installed yet?
if (!function_exists('curl_init')){
die('Sorry cURL is not installed!');
}
// OK cool - then let's create a new cURL resource handle
$ch = curl_init();
@nishad
nishad / mobtable.html
Created March 31, 2016 07:25 — forked from hkirsman/mobtable.html
turn tables into mobile friendly
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="et">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>table</title>
<style type="text/css">
.odd { background-color: #808080; }
.generated_for_mobile { margin-bottom: 30px }
@nishad
nishad / simple_google_analytics.rb
Created March 22, 2016 08:57 — forked from chrisle/simple_google_analytics.rb
My simple Google Analytics API export API. Exports GA data as an array of flattened hashes with a SHA1 signature. No DSL, no sugar.
require 'digest'
# = simple_google_analytics.rb
#
# Chris Le <chris at iamchrisle dot com>
#
# This module is an wrapper to export data from Google Analytics as a flattened
# hash suitable for database storage. It does not require any other gems other
# than 'oauth'. I used this simply to get metrics and directly store them in
# a database.
@nishad
nishad / index.php
Created March 11, 2016 02:01
Simple PHP Redirect
<?php
function Redirect($url, $permanent = false)
{
if (headers_sent() === false)
{
header('Location: ' . $url, true, ($permanent === true) ? 301 : 302);
}
exit();
}
@nishad
nishad / index.php
Last active January 27, 2016 06:10 — forked from splitbrain/index.php
Text summary (Automated)
<?php
$OTS = '/usr/bin/ots';
loadurl();
if(!isset($_REQUEST['format']) || $_REQUEST['format'] =! 'text'){
header('Content-Type: text/html; charset=utf-8');
html_header();
form();
@nishad
nishad / smi2srt.py
Created October 27, 2015 14:22
convert script in SMI to SRT format
#!/usr/bin/env python
# -*- coding: UTF-8 -*-
'''
@package smi2srt
@brief this module is for convert .smi subtitle file into .srt subtitle
(Request by Alfred Chae)
Started : 2011/08/08
license: GPL
@nishad
nishad / mubi.py
Created September 22, 2015 23:47 — forked from vchahun/mubi.py
Do some dark magic.
import os
import argparse
import requests
import progressbar
def main():
parser = argparse.ArgumentParser(description='All your MUBI are belong to us.')
parser.add_argument('film_id', type=int)
parser.add_argument('resolution', choices=('360p', '480p', '640w', '720w', '1280w'))
parser.add_argument('output_file')
<?php
snippet('header');
$tag = urldecode(param('tag'));
if(param('tag'))
$articles=$pages->visible()->filterBy('tags',$tag,',')->sortBy('date')->flip();
?>
<main class="main">
<section>
<h1><?php echo $page->title() . ' ' . $tag ?></h1>