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 / comment_TODO.sublime-snippet
Last active December 12, 2015 08:29
This is SUBLIME TEXT 2 snippet. It contain different types of "comment" snippet for c programming. Just PRESS "z" to get the snippet.It works for c codes.Keep these files in your Packages > User
<snippet>
<content><![CDATA[
/**
TODO:
- ${1:Enter your todo item}
- ${2:Second todo item}
**/
@Himanshu-Mishr
Himanshu-Mishr / StackOperationWithVector.cpp
Created November 27, 2013 04:51
Implementing stack with vector
/*
* Copyright 2013 Himanshu Mishra <himanshu.m786@gmail.com>
*
* 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,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
@Himanshu-Mishr
Himanshu-Mishr / mygui.py
Created January 12, 2014 04:26
gui example
'''
shows out a single button GUI in this way as a class
'''
from tkinter import *
from tkinter.messagebox import showinfo
class MyGUI(Frame):
def __init__(self, parent=None):
Frame.__init__(self, parent)
button = Button(self, text='press', command=self.reply)
@Himanshu-Mishr
Himanshu-Mishr / server.c
Created March 23, 2014 19:33
Server-Client Chatting System on same computer. This code is to be run before client.c
/*=============================================================================
| Program Name: Server-Client Chatting System on same computer(UNIX-based)
|
| Description: Server-side code
|
+-----------------------------------------------------------------------------
| Author: Himanshu Mishra
| Email : himanshu.m786@gmail.com
*===========================================================================*/
@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 : himanshu.m786@gmail.com
*===========================================================================*/
#!/usr/bin/python
"""Usage:
X.py < X.in > X.out
"""
################################################################################
# util functions
logging = False
; 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;
@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,
@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 / 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