Skip to content

Instantly share code, notes, and snippets.

🎯
Focusing

Kaushik Varanasi kaushik94

🎯
Focusing
Block or report user

Report or block kaushik94

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View medium-codechef-RRSERVER-1.c
#include <stdio.h>
#include <string.h>
#define MIN(a,b) (((a)<(b))?(a):(b))
int getBit(long long int s, int i) {
return (s >> i) & 1;
}
long long int clearBit(long long int s, int i) {
s ^= 1 << i;
View medium-8459b3c21ccc-2.py
strings = ['I', 'am', 'the', 'laziest', 'person', 'in', 'the', 'world' ]
s = ''
s.join(strings)
View medium-8459b3c21ccc-1.py
strings = ['I', 'am', 'the', 'laziest', 'person', 'in', 'the', 'world' ]
s = ""
for string in strings:
s = s+string
print(s)
@kaushik94
kaushik94 / gist:b339b1ebe1eb5f3ccff958e20287b529
Created Jan 25, 2019 — forked from mattfelsen/gist:9467420
Splitting strings by a delimiter for Arduino
View gist:b339b1ebe1eb5f3ccff958e20287b529
//
// This is tested and works!
//
String input = "123,456";
int firstVal, secondVal;
for (int i = 0; i < input.length(); i++) {
if (input.substring(i, i+1) == ",") {
firstVal = input.substring(0, i).toInt();
secondVal = input.substring(i+1).toInt();
@kaushik94
kaushik94 / .mongorc.js
Created Mar 20, 2018 — forked from yanatan16/.mongorc.js
My .mongorc.js file
View .mongorc.js
(function () {
rcversion = '1.0';
load('underscore.min.js')
// NOTES
// Basics, wrap the whole thing in a function
// Set a version for sanity's sake
// Load underscore, a must in any javascript environment
@kaushik94
kaushik94 / git-deployment.md
Created Mar 5, 2018 — forked from noelboss/git-deployment.md
Simple automated GIT Deployment using Hooks
View git-deployment.md

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your lokal GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like my Deepl.io to act upon a Web-Hook that's triggered that service.

View fathead_output_escape_tabs.py
__author__ = 'kvaranasi'
import csv
import os
import re
rootdir = os.getcwd()
rootdir += '/lib/fathead'
for subdir, dirs, files in os.walk(rootdir):
for file in files:
View ohwonder.zsh-theme
local ret_status="%(?:%{$fg_bold[green]%}🤖 :%{$fg_bold[red]%}💩 )"
PROMPT='${ret_status} %{$fg[cyan]%}%c%{$reset_color%} $(git_prompt_info)'
ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[blue]%}[%{$fg[red]%}"
ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%} "
ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}] %{$fg[yellow]%}😡 "
ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}] 😇 "
@kaushik94
kaushik94 / file2.txt
Created May 20, 2016
the description for this gist
View file2.txt
String file contents
@kaushik94
kaushik94 / file1.txt
Created May 20, 2016
the description for this gist
View file1.txt
String file contents
You can’t perform that action at this time.