Skip to content

Instantly share code, notes, and snippets.

View rohitpaulk's full-sized avatar

Paul Kuruvilla rohitpaulk

View GitHub Profile
@rohitpaulk
rohitpaulk / definitions.yml
Created June 8, 2022 22:37
Course definitions
- language: clojure
file_mappings:
- source: starter_templates/README.md
target: README.md
- source: starter_templates/codecrafters.yml
target: codecrafters.yml
- source: starter_templates/clojure/.gitignore
target: .gitignore
- source: starter_templates/clojure/project.clj
target: project.clj
@rohitpaulk
rohitpaulk / git_clean.sh
Created July 8, 2017 14:02
Delete old merged git branches
git branch --merged | egrep -v "(^\*|master)" | xargs git branch -d
@rohitpaulk
rohitpaulk / server.c
Created March 24, 2020 12:22
Redis Starter C
#include <stdio.h>
#include <stdlib.h>
#include <sys/socket.h>
#include <netinet/in.h>
#include <netinet/ip.h>
#include <string.h>
#include <errno.h>
#include <unistd.h>
int main() {
@rohitpaulk
rohitpaulk / huge_file.go
Last active March 17, 2020 10:16
Write a huge file in Go
package main
import (
"fmt"
"os"
"strings"
)
func main() {
f, err := os.Create("/tmp/dat2")
@rohitpaulk
rohitpaulk / swift_build_madness.Dockerfile
Created February 4, 2020 06:51
Swift build madness
RUN mkdir /root/Scribble-Server
ADD Tests /root/Scribble-Server/Tests
ADD Package.swift /root/Scribble-Server
ADD Package.resolved /root/Scribble-Server
# Add a dummy file for resolving dependencies and pre-building first
ADD Sources/DummyForDependencies/main.swift /root/Scribble-Server/Sources/ScribbleServer/main.swift
ADD Sources/DummyForDependencies/DummyModel.swift /root/Scribble-Server/Sources/CanvasModel/DummyModel.swift
@rohitpaulk
rohitpaulk / named_struct.rb
Last active September 8, 2019 19:33
NamedStruct
class NamedStruct < Struct
# Allows initialization via keyword arguments. By default, Ruby
# only allows positional arguments.
def initialize(**kwargs)
super(*members.map{|k| kwargs[k] })
end
end
from shell import shell
from datetime import date, timedelta
import json
from concurrent.futures import ThreadPoolExecutor
import csv
DAYS_IN_PAST = 180
from shell import shell
from datetime import date, timedelta
import json
from concurrent.futures import ThreadPoolExecutor
import csv
DAYS_IN_PAST = 180
from shell import shell
from datetime import date, timedelta
import json
from concurrent.futures import ThreadPoolExecutor
import csv
DAYS_IN_PAST = 10

Keybase proof

I hereby claim:

  • I am rohitpaulk on github.
  • I am rohitpaulk (https://keybase.io/rohitpaulk) on keybase.
  • I have a public key ASALGuPml2_DMms2tCBUrIF8MeCPIB-njkHBnF-mXw8NmQo

To claim this, I am signing this object: