Skip to content

Instantly share code, notes, and snippets.

View nehaljwani's full-sized avatar

Nehal J Wani nehaljwani

View GitHub Profile
Typically used irssi config
### Large portions shamelessly copied from https://wiki.archlinux.org/index.php/Irssi (Thank you Arch Wiki )
# Please refer to the aforementioned link for more detail and customization.
# irssi has a pretty good default config that you don't usually want to mess with much
# A couple of basic things that are needed are specified here. Type /set to see a complete list of modifiable parameters.
# BASIC SETUP:
#!/usr/bin/env python
import poplib
import sys
lenArgs = len(sys.argv)
if lenArgs != 5:
print "\n\tDelete all messages from <startMsg> to <endMsg> on Students server\n"
print "\tUsage:./script <username>[without @students.iiit.ac.in] <password> <startMsg> <endMsg>\n"
sys.exit(0)
server = "students.iiit.ac.in"
port = 995
#!/bin/sh
#
# fedora-fromiso - Patch the ramdisk of Fedora to allow booting from
# ISO image
#
# Copyright (C) 2012 Mansour <mansour@oxplot.com>
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
#!/usr/bin/env python
"""Simple HTTP Server With Upload.
This module builds on BaseHTTPServer by implementing the standard GET
and HEAD requests in a fairly straightforward manner.
"""
#!/usr/bin/env bash
# === Colour Definitions ===
red='\e[0;31m'
green='\e[0;32m'
purple='\e[0;35m'
orange='\e[0;33m'
# No Color, i.e. turn off color
nc='\e[0m'
@nehaljwani
nehaljwani / memusg
Created May 1, 2014 13:56 — forked from netj/memusg
#!/usr/bin/env bash
# memusg -- Measure memory usage of processes
# Usage: memusg COMMAND [ARGS]...
#
# Author: Jaeho Shin <netj@sparcs.org>
# Created: 2010-08-16
set -um
# check input
[ $# -gt 0 ] || { sed -n '2,/^#$/ s/^# //p' <"$0"; exit 1; }
#!/bin/bash
#
## @file rgb-colored-echo.sh
## @author Amber Jain
## @section DESCRIPTION A bash pretty print script which provides red/green/blue colored echo functions
## @section LICENSE ISC
#################
# Documentation #
@nehaljwani
nehaljwani / current_utc_time.c
Created October 1, 2018 03:39 — forked from jbenet/current_utc_time.c
work around lack of clock_gettime in os x
/*
author: jbenet
os x, compile with: gcc -o testo test.c
linux, compile with: gcc -o testo test.c -lrt
*/
#include <time.h>
#include <sys/time.h>
#include <stdio.h>
@nehaljwani
nehaljwani / gist:ef9b162e7c3b571f6ce5c1e709c97053
Created November 21, 2018 04:00 — forked from spudbean/gist:1558257
Look of disapproval and other emoticons
ಠ_ಠ
( ͡° ͜ʖ ͡°)
¯\_(ツ)_/¯
(╯°□°)╯︵ ┻━┻
http://www.fileformat.info/convert/text/upside-down.htm
WRTTN http://wrttn.me/30dbfd/
Unicode Emoticons
@nehaljwani
nehaljwani / generate_directory_index_caddystyle.py
Created February 1, 2022 04:40 — forked from glowinthedark/generate_directory_index_caddystyle.py
Generate directory index (recurse subfolders with `-r` or `--recursive`). Use `-h` or `--help` for all options
#!/usr/bin/env python3
# ---
# Copyright 2020 glowinthedark
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
#
# You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,