Skip to content

Instantly share code, notes, and snippets.

Janith Leanage janithl

View GitHub Profile
janithl / timeline.svg
Last active May 17, 2020
Timeline of US late night shows on the 3 major networks. This file is released under a CC0 license:
View timeline.svg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View versioncheck.go
package main
import (
View itemlist.json
"id": 1,
"name": "Grape Soda Lupine"
}, {
"id": 2,
"name": "Pseudoleskeella Moss"
}, {
"id": 3,
"name": "Rosette Lichen"
}, {
janithl / himal.json
Created Apr 13, 2019
A JSON dump of ~4 months of Himal tweets
View himal.json
This file has been truncated, but you can view the full file.
"created_at": "Thu Nov 15 10:31:45 +0000 2018",
"id": 1063016696879824897,
"id_str": "1063016696879824897",
"text": "SLPP Muslims? Is that like Gestapo Jews?",
"truncated": false,
"entities": {
"hashtags": [],
janithl / feed.php
Last active Apr 4, 2019
PHP script for turning your Google+ feeds into valid RSS. You need to edit a couple of places but I'm sure you're smart enough to figure that out... :)
View feed.php
header('Content-type: text/xml');
$gendate = date('r', time());
$config = array(
'gplusid' => '116783522121096138585',
'gplusname' => 'Janith Leanage',
'hosturl' => ''
View FB Insights
"Post ID",
"Post Message",
"Lifetime Post Total Reach",
"Lifetime Post organic reach",
"Lifetime Post Paid Reach",
View docker-compose.yml
version: "2"
image: nginx:alpine
- "8000:80"
- .:/var/www
- ./docker/nginx/site.conf:/etc/nginx/conf.d/default.conf
View site.conf
server {
listen 80;
index index.php index.html;
server_name localhost;
error_log /var/log/nginx/error.log;
access_log /var/log/nginx/access.log;
root /var/www;
location / {
try_files $uri $uri/ /index.php;
janithl / version.go
Last active Oct 5, 2018
A simple Go utility for work, where we need to get the version of a site through its generator meta tag
View version.go
package main
import (
janithl / hello.go
Created Sep 3, 2018
HelloWorld in Go
View hello.go
package main
import "fmt"
import "time"
func main() {
fmt.Println("ආයුබෝවේවා, මහරජානනි.")
var t = time.Now()
fmt.Printf("දැන් වේලාව %02d:%02d\n", t.Hour(), t.Minute())
You can’t perform that action at this time.