Skip to content

Instantly share code, notes, and snippets.

View KarthikNayak's full-sized avatar
🖥️
At Delivery Hero

Karthik Nayak KarthikNayak

🖥️
At Delivery Hero
View GitHub Profile
@KarthikNayak
KarthikNayak / wrapper.go
Created January 30, 2019 00:57
Go Meetup NYC; 29th Jan
package main
import (
"io"
"os"
"fmt"
"time"
)
type SlowWriter struct {
@KarthikNayak
KarthikNayak / QLearning.ipynb
Last active January 25, 2019 17:04
Basic QLearning with Pytorch
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@KarthikNayak
KarthikNayak / main.go
Created September 29, 2018 05:08
Database server
package main
import (
"errors"
"fmt"
"net/http"
)
type getSetter interface {
set(key, value string) error
@KarthikNayak
KarthikNayak / prepare-commit-msg
Created March 21, 2018 05:35
Git prepare-commit-msg hook for projects dealing with JIRA
#!/bin/bash
# Succeed on all merge messages, as evidenced by MERGE_MSG existing
[ -f $GIT_DIR/MERGE_MSG ] && exit 0
BRANCH=$(git branch | grep '*' | sed 's/* //')
read -r -d '' HELP_TEXT << EOM
# 1. Separate subject from body with a blank line
# 2. Limit the subject line to 50 characters
@KarthikNayak
KarthikNayak / simple_keycheck2.c
Created October 23, 2017 16:39
30 Days of CTF: Day 2
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
int main(int argc, char *argv[])
{
int i, sum = 0;
if (argc != 2) {
printf("Improper input\nUsage: ./simple_keygen <KEY>\n");
return -1;
@KarthikNayak
KarthikNayak / simple_keycheck.c
Last active October 23, 2017 16:38
Medium: 30days of hacking: Day1
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char *argv[])
{
if (argc != 2) {
printf("Improper input\nUsage: ./simple_keygen <KEY>\n");
return -1;
}
if (!strcmp("WhatASimpleKey", argv[1])) {
@KarthikNayak
KarthikNayak / a.md
Last active August 19, 2023 16:14
Installing Arch with LVM
@KarthikNayak
KarthikNayak / comp.sh
Last active November 21, 2023 13:37
Hello world x64 assembly [0]
nasm -f elf64 hello.asm -o hello.o
ld -o hello hello.o -m elf_x86_64
@KarthikNayak
KarthikNayak / i3.config
Last active August 29, 2015 14:10
My i3 Config file's
# This file has been auto-generated by i3-config-wizard(1).
# It will not be overwritten, so edit it as you like.
#
# Should you change your keyboard layout somewhen, delete
# this file and re-run i3-config-wizard(1).
#
# i3 config file (v4)
#
# Please see http://i3wm.org/docs/userguide.html for a complete reference!
@KarthikNayak
KarthikNayak / manjaro-bashrc.sh
Last active August 29, 2015 14:03 — forked from jlhg/manjaro-bashrc.sh
bashrc file
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
if [ -f /etc/bash_completion ]; then
. /etc/bash_completion
fi
xhost +local:root > /dev/null 2>&1