Skip to content

Instantly share code, notes, and snippets.

View shishirsharma's full-sized avatar
🤑
Focusing

Shishir Sharma shishirsharma

🤑
Focusing
View GitHub Profile
@shishirsharma
shishirsharma / dc.cpp
Created February 7, 2015 06:52
Desktop Calculator is a application coded in Standard C++. It is a application based on the example 6.1 in the book "The C++ Programming Language", Third Edition by Bjarne Stroustrup.
/*
* This file is part of Desktop Calculator.
*
* Desktop Calculator 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 3 of the License, or
* (at your option) any later version.
*
* Desktop Calculator is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
sudo chown root /Library/LaunchAgents/gnu.emacs.daemon.plist
sudo launchctl load -w /Library/LaunchAgents/gnu.emacs.daemon.plist
@shishirsharma
shishirsharma / python-2.6-config.bat
Created June 22, 2014 09:20
python-2.6-config.bat
@ECHO OFF
@SET PATH= %PATH%;C:appandyourpathhere;D:appandonemore
@SET SOMEVARABLE=E:somepath
@SET DIRCMD=/D /N
@PROMPT $G
@ECHO Setting environment for YOURSYSTEM VER
@ECHO %TIME% %DATE%
@ECHO Namaskar Criss.
@shishirsharma
shishirsharma / winexample.cpp
Created June 22, 2014 09:08
Windows GUI example code.
// Windows GUI example code
#include < windows.h >
/* Declare Windows procedure */
LRESULT CALLBACK WindowProcedure (HWND, UINT, WPARAM, LPARAM);
/* Make the class name into a global variable */
char szClassName[ ] = "WindowsExApp";
$ sudo apt-get install imagemagick
$ sudo apt-get install poppler-utils
@shishirsharma
shishirsharma / .irbrc
Last active February 9, 2020 10:22
IRB Console with history and logging
#! /usr/bin/env ruby
# -*- Ruby-*-
require 'irb/completion'
require 'irb/ext/save-history'
ARGV.concat [ "--readline",
"--prompt-mode",
"simple" ]
# 100 entries in the list
@shishirsharma
shishirsharma / ethernet.c
Created October 14, 2013 09:51
How to access a website with multiple virtual hosts from Arduino Ethernet Shield
#include <SPI.h>
#include <Ethernet.h>
// Enter a MAC address and IP address for your controller below.
// The IP address will be dependent on your local network:
byte mac[] = { 0xDE, 0xAD, 0xBE, 0xEF, 0xFE, 0xED };
byte ip[] = { 192, 168, 6, 30 };
byte server[] = { ***, ***, 168, 16 }; // Your VPS
export HISTCONTROL=ignoredups:erasedups # no duplicate entries
export HISTSIZE=100000 # big big history
export HISTFILESIZE=100000 # big big history
shopt -s histappend # append to history, don't overwrite it
# Save and reload the history after each command finishes
export PROMPT_COMMAND="history -a; history -c; history -r; $PROMPT_COMMAND"
# Tmux/Screen tab title
case "$TERM" in
screen)
PROMPT_COMMAND="printf '\033k$(hostname -s)\033\';"${PROMPT_COMMAND}
;;
esac
@shishirsharma
shishirsharma / .tmux.conf
Last active December 25, 2015 11:48
Here is how to get colors working and allow native scrollback in terminal.app
# Show colors
set -g default-terminal "xterm-color"
# Allow native scroll back in terminal.app
set -ga terminal-overrides 'xterm*:smcup@:rmcup@'