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
@nishad
nishad / install-nginx-rtmp-module.sh
Created January 22, 2020 10:38 — forked from afriza/install-nginx-rtmp-module.sh
Install NGINX RTMP module with HLS support on Ubuntu 18.04
sudo apt install curl gnupg2 ca-certificates lsb-release
echo "deb http://nginx.org/packages/ubuntu `lsb_release -cs` nginx" | sudo tee /etc/apt/sources.list.d/nginx.list
curl -fsSL https://nginx.org/keys/nginx_signing.key | sudo apt-key add -
sudo apt update
NGINX_VERSION=$(apt show nginx | grep "^Version" | cut -d " " -f 2 | cut -d "-" -f 1)
# take note of the nginx version in the "stable" release. e.g. 1.14.2
echo NGINX version $NGINX_VERSION
wget https://hg.nginx.org/pkg-oss/raw-file/default/build_module.sh
chmod a+x build_module.sh
@nishad
nishad / wine.rdf
Created June 7, 2019 14:17
Wine Ontology
<?xml version="1.0"?>
<!DOCTYPE rdf:RDF [
<!ENTITY vin "http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#" >
<!ENTITY food "http://www.w3.org/TR/2003/PR-owl-guide-20031209/food#" >
<!ENTITY owl "http://www.w3.org/2002/07/owl#" >
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
]>
<rdf:RDF
xmlns = "http://www.w3.org/TR/2003/PR-owl-guide-20031209/wine#"
@nishad
nishad / urlmarker.py
Created March 29, 2019 07:56
Url extraction in python from strings
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
url matching regex
http://ryancompton.net/2015/02/16/url-extraction-in-python/
http://daringfireball.net/2010/07/improved_regex_for_matching_urls
Example :
@nishad
nishad / ggit.sh
Created March 16, 2019 10:16
A quick and dirty git commit command
#!/bin/bash
git-random(){ gitRan=$(curl -L -s http://whatthecommit.com/ |grep -A 1 "\"c" |tail -1 |sed 's/<p>//'); git commit -S -m "$gitRan"; }
if [ -z "$1" ]; then
git add --all .
git-random
else
git add --all .
git commit -S -m "$*"
@nishad
nishad / wget-snapshotpage.md
Created October 26, 2018 12:55 — forked from dannguyen/wget-snapshotpage.md
Use wget to snapshot a page and its necessary visual dependencies

Use wget to mirror a single page and its visible dependencies (images, styles)

Money graphic via State of Florida CFO Vendor Payment Search

Graphic via State of Florida CFO Vendor Payment Search (flair.myfloridacfo.com)

This is a quick command I use to snapshot webpages that have a fun image I want to keep for my own collection of WTFViz. Why not just right-click and save the image? Oftentimes, the webpage in which the image is embedded contains necessary context, such as captions and links to important documentation just incase you forget what exactly that fun graphic was trying to explain.

@nishad
nishad / memcached-status-page.md
Last active August 3, 2018 13:03 — forked from jbraithwaite/memcached-status-page.md
Memcached Status page in PHP

Screenshot

@nishad
nishad / backup-dt.sh
Created July 7, 2018 15:16
Simple clean and backup script for OS X Desktop
#!/bin/bash
time_stamp=$(date +%Y%m%d)
mkdir -p ~/Backup/Desktop/$time_stamp
mv ~/Desktop/* ~/Backup/Desktop/$time_stamp
@nishad
nishad / backup-dl.sh
Created July 7, 2018 15:15
Simple clean and backup script for OSX Downloads folder
#!/bin/bash
time_stamp=$(date +%Y-%m-%d)
mkdir -p ~/Backup/Downloads/$time_stamp
mv ~/Downloads/* ~/Backup/Downloads/$time_stamp
@nishad
nishad / csv2xml.py
Created July 6, 2018 03:49 — forked from justinvw/csv2xml.py
Simple script to convert a CSV file to XML
#!/usr/bin/env python
# encoding: utf-8
"""
csv2xml.py
Created by Justin van Wees on 2011-04-18.
"""
import sys
import os
import string
@nishad
nishad / menu.html
Created June 14, 2018 14:15 — forked from marklindhout/menu.html
A simple yet smooth full-fledged jQuery dropdown menu that works across all modern browsers.
<nav id="access">
<ul class="menu">
<li><a href="#">Home</a></li>
<li><a href="#">Page 1</a>
<ul class="sub-menu">
<li><a href="#">Page 1.1</a></li>
<li><a href="#">Page 1.2</a></li>
<li><a href="#">Page 1.3</a></li>
<li><a href="#">Page 1.4</a></li>
<li><a href="#">Page 1.5</a></li>