Skip to content

Instantly share code, notes, and snippets.

View kodekracker's full-sized avatar
🎯
Focusing

Akshay Pratap Singh kodekracker

🎯
Focusing
View GitHub Profile
@kodekracker
kodekracker / Preferences.sublime-settings
Last active August 29, 2015 14:02
User Preferences of Sublime Text Editor
{
"color_scheme": "Packages/Color Scheme - Default/Mac Classic.tmTheme",
"draw_white_space": "all",
"ensure_newline_at_eof_on_save": true,
"font_size": 12,
"highlight_line": true,
"ignored_packages":
[
"Markdown",
"Vintage"
@kodekracker
kodekracker / .gitconfig
Last active June 14, 2017 18:59
A global .gitconfig file
[user]
name = Akshay Pratap Singh
email = pratapakshay0@gmail.com
[core]
editor = gedit
excludesfile = /home/kodekracker/.gitignore
[color]
status = auto
branch = auto
interactive = auto
@kodekracker
kodekracker / .gitignore
Last active June 14, 2017 18:57
A global .gitignore file
# Folder view configuration files
.DS_Store
Desktop.ini
# Thumbnail cache files
._*
Thumbs.db
# Files that might appear on external disks
.Spotlight-V100
@kodekracker
kodekracker / c++Template.cpp
Last active May 19, 2024 15:05
Basic C++ Template for Competitive Programming
/*
* Note: This template uses some c++11 functions , so you have to compile it with c++11 flag.
* Example:- $ g++ -std=c++11 c++Template.cpp
*
* Author : Akshay Pratap Singh
* Handle: code_crack_01
*
*/
/******** All Required Header Files ********/
@kodekracker
kodekracker / c++Template-Codejam.cpp
Last active January 26, 2022 21:57
Basic C++ Template for Google Code Jam or File I/O Competitive Programming
/*
* Note: This template uses some c++11 functions , so you have to compile it with c++11 flag.
* Example:- $ g++ -std=c++11 c++Template-Codejam.cpp
*
* Author : Akshay Pratap Singh
* Handle: code_crack_01
*
*/
/******** All Required Header Files ********/
@kodekracker
kodekracker / UFDS.cpp
Last active August 25, 2018 16:06
C++ class of UFDS(Union-Find Disjoint Sets)
/*
Author : Akshay Pratap Singh
Email-Id : pratapakshay0@gmail.com
*/
/******** Union-Find Disjoint Set Implementation *****/
class UFDS {
private:
vector<int> p, rank, setSizes;
int numSets;
@kodekracker
kodekracker / API.md
Created August 15, 2014 16:56 — forked from theskumar/API.md

Title

<Additional information about your API call. Try to use verbs that match both request type (fetching vs modifying) and plurality (one vs multiple).>

  • URL

    <The URL Structure (path only, no root url)>

  • Method:

@kodekracker
kodekracker / c++Template-4-Topcoder
Last active October 10, 2019 16:42
C++ Template for Topcoder Contests
/*
* Note: This template uses some c++11 functions , so you have to compile it with c++11 flag.
* Example:- $ g++ -std=c++11 c++Template-4-Topcoder.cpp
*
* Author : Akshay Pratap Singh
* Handle: code_crack_01
*
*/
/******** All Required Header Files ********/
@kodekracker
kodekracker / set_virtual_host.sh
Last active December 10, 2017 18:17
A shell script file to create a virtual host on apache server to host your website , just copy this script in your root directory of website and set the SERVER_IP,HOST_NAME variable in the file, change the executable permission and run it.This will automatically add your virtual-host and runs your website at a specified host name.
#!/bin/bash
# Author : Akshay Pratap Singh
# Email-id : pratapakshay0@gmail.com
# These variable are sets by user
SERVER_IP="127.0.0.1"
HOST_NAME="example.com"
DIR_PATH=$(pwd)
APACHE_DIR_PATH="/etc/apache2/sites-available"
@kodekracker
kodekracker / check_root.sh
Created November 26, 2014 17:25
How to check a script file is being run as root
#!/bin/bash
# Author : Akshay Pratap Singh
# Email-id : pratapakshay0@gmail.com
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi