Skip to content

Instantly share code, notes, and snippets.

View skywalker-nick's full-sized avatar
👀

Nick Ma skywalker-nick

👀
View GitHub Profile
@pat
pat / LICENSE.txt
Last active February 4, 2023 21:02
Running Setup SQL scripts on an RDS instance within a VPC, via Terraform
The MIT License (MIT)
Copyright (c) 2018 Pat Allan
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@rudolfovich
rudolfovich / csvfile.h
Last active June 13, 2024 08:39
CSV file generator
#pragma once
#include <string>
#include <iostream>
#include <fstream>
#include <sstream>
class csvfile;
inline static csvfile& endrow(csvfile& file);
inline static csvfile& flush(csvfile& file);
@ummahusla
ummahusla / git-overwrite-branch.sh
Last active May 20, 2024 16:27 — forked from brev/git-overwrite-branch.sh
Git overwrite branch with another branch
# overwrite master with contents of feature branch (feature > master)
git checkout feature # source name
git merge -s ours master # target name
git checkout master # target name
git merge feature # source name
@JenkinsDev
JenkinsDev / fisher-yates-shuffle.py
Last active October 14, 2020 15:00
Fisher-Yates Shuffle In Python
from random import randint, random
from math import floor
def fisher_yates_shuffle(the_list):
list_range = range(0, len(the_list))
for i in list_range:
j = randint(list_range[0], list_range[-1])
the_list[i], the_list[j] = the_list[j], the_list[i]
return the_list
@iros
iros / API.md
Created August 22, 2012 14:42
Documenting your REST API

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: