Skip to content

Instantly share code, notes, and snippets.

View ishan-marikar's full-sized avatar
📚
Learning Data Visualisation and Data Science

Ishan Marikar ishan-marikar

📚
Learning Data Visualisation and Data Science
View GitHub Profile
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
$env:Path +=";" + $env:systemdrive + "\chocolatey\bin"
cwindowsfeatures MSMQ-Server
cinst git.commandline
$env:Path +=";" + $env:systemdrive + "\git\bin"
cinst git-credential-winstore
git config --global core.autocrlf input

This is a markdown file

A very pretty markdown file.

.. with unordered lists:

  • Hello
  • I am
  • a list

.. and ordered lists:

  1. Yaay! More lists!
SELECT word FROM ts_stat('
SELECT to_tsvector(''english'', message)
FROM backlog
WHERE bufferid = 14'
)
WHERE char_length(word) >= 2
ORDER BY nentry DESC, ndoc DESC, word
LIMIT 10;
<?php
# Nginx don't have PATH_INFO
if (!isset($_SERVER['PATH_INFO'])) {
$_SERVER['PATH_INFO'] = substr($_SERVER["ORIG_SCRIPT_FILENAME"], strlen($_SERVER["SCRIPT_FILENAME"]));
}
$request = substr($_SERVER['PATH_INFO'], 1);
$file = $request;
$fp = @fopen($file, 'rb');
@ishan-marikar
ishan-marikar / cs.py
Last active August 29, 2015 14:20 — forked from myano/cs.py
#!/usr/bin/env python
import curses
import curses.textpad
import time
stdscr = curses.initscr()
#curses.noecho()
#curses.echo()
$(function(){
var socket = io.connect('http://localhost:8080');
socket.on('tweet', function(tweet) {
$('body').append('<div class="tweet">' + tweet.text + '</div>');
});
});
#! /usr/bin/env python
import sys
import urllib
import subprocess
def reporthook(count, block_size, total_size):
sys.stdout.write("\r%6.2f %% [%i/%i]"%((count * block_size * 100.0 /
total_size), count * block_size, total_size))
sys.stdout.flush()
import ConfigParser, mmap
config_file = "/usr/share/applications/google-chrome.desktop"
add_string_to_each_section = ["StartupWMClass", "Google-chrome-stable"]
option = add_string_to_each_section[0]
value = add_string_to_each_section[1]
class Fixer:
def check(self, cf, option, value):
@ishan-marikar
ishan-marikar / ircparse.coffee
Last active August 29, 2015 14:26
A regular expression that parses RFC2812 (IRC protocol)
# original work by Michael F. Lamb. License: GPLv3.
RFC2812Matcher = ///
^ # We'll match the whole line. Start.
# Optional prefix and the space that separates it
# from the next thing. Prefix can be a servername,
# or nick[[!user]@host]
(?::( # This whole set is optional but if it's
# here it begins with : and ends with space
([^@!\ ]*) # nick
@ishan-marikar
ishan-marikar / irccat
Last active August 29, 2015 14:26 — forked from vivien/irccat
irccat - Using netcat with an IRC channel
#!/bin/sh
# Copyright 2014 Vivien Didelot <[email protected]>
# Licensed under the terms of the GNU GPL v3, or any later version.
NICK=irccat42
SERVER=irc.freenode.net
PORT=6667
CHAN="#irccat"
{