Skip to content

Instantly share code, notes, and snippets.

View Himanshu-Mishr's full-sized avatar

Himanshu Mishra Himanshu-Mishr

View GitHub Profile
@Himanshu-Mishr
Himanshu-Mishr / http-response-interceptor.js
Created December 18, 2016 14:59 — forked from idosela/http-response-interceptor.js
Sample code for ng-conf 2014
angular.module('myMdl', []).config(['$httpProvider', function($httpProvider) {
$httpProvider.responseInterceptors.push([
'$q', '$templateCache', 'activeProfile',
function($q, $templateCache, activeProfile) {
// Keep track which HTML templates have already been modified.
var modifiedTemplates = {};
// Tests if there are any keep/omit attributes.
var HAS_FLAGS_EXP = /data-(keep|omit)/;
@Himanshu-Mishr
Himanshu-Mishr / updateTracker.py
Created August 9, 2016 06:17
Update Tracker for a product ecosystem
import os, subprocess
# Global variables
EXCLUDE_FOLDERS = ["node_modules", "bower_components", ".git", "uploads"]
PRESENT_DIRECTORY = "."
def get_git_repo_path():
git_repo_dir_list = []
@Himanshu-Mishr
Himanshu-Mishr / codegolf.md
Last active August 29, 2015 14:23 — forked from xem/codegolf.md
@Himanshu-Mishr
Himanshu-Mishr / error
Created May 19, 2015 08:53
Fish installation output
~/T/fish-2.2b1  ./configure Tue May 19 14:19:20 IST 2015
checking if autoconf needs to be run... no
checking if autoheader needs to be run... no
checking for g++... g++
checking whether the C++ compiler works... yes
checking for C++ compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C++ compiler... yes
@Himanshu-Mishr
Himanshu-Mishr / theme
Created May 6, 2015 07:36
126 Themes for Terminal (Elementary OS)
#!/bin/bash
# Download it.
# Name it as 'theme'
# Place it in /usr/bin/
# shell_prompt$ theme
echo '
3024 Day ( 1) 3024 Night ( 2) AdventureTime ( 3)
Afterglow ( 4) AlienBlood ( 5) Argonaut ( 6)
Arthur ( 7) Atom ( 8) Belafonte Day ( 9)
Belafonte Night ( 10) BirdsOfParadise ( 11) Blazer ( 12)
@Himanshu-Mishr
Himanshu-Mishr / gist:44a4c87a8799f74c3880
Created March 27, 2015 18:02
BEO - Better Error Output. works with GCC/G++. Requires python3
#!/bin/python3
#
# Copyright 2015 Himanshu Mishra
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
; Don't forget to change the Icon and Exec path to your needs
; And save this file into the ~/.local/share/applications/ directory
[Desktop Entry]
Version=1.0
Type=Application
Name=Notes
Icon=/home/mariocesar/bin/notes.png
Exec=/home/mariocesar/bin/notes.py
Categories=Accessories;
#!/usr/bin/python
"""Usage:
X.py < X.in > X.out
"""
################################################################################
# util functions
logging = False
@Himanshu-Mishr
Himanshu-Mishr / client.c
Created March 23, 2014 19:34
Server-Client Chatting System on same computer. This code is to be run after server.c
/*=============================================================================
| Program Name: Server-Client Chatting System on same computer(UNIX-based)
|
| Description: Client-side code
|
+-----------------------------------------------------------------------------
| Author: Himanshu Mishra
| Email : [email protected]
*===========================================================================*/