Skip to content

Instantly share code, notes, and snippets.

View f0lie's full-sized avatar
💪
still alive

f0lie f0lie

💪
still alive
View GitHub Profile
@smidgedy
smidgedy / SimpleHTTPServerWithUpload.py
Last active May 5, 2024 18:00 — forked from UniIsland/SimpleHTTPServerWithUpload.py
Simple Python Http Server with Upload
#!/usr/env python3
########################################################################
#
# Simple HTTP server that supports file upload for moving data around
# between boxen on HTB. Based on a gist by bones7456, but mangled by me
# as I've tried (badly) to port it to Python 3, code golf it, and make
# It a little more robust. I was also able to strip out a lot of the
# code trivially because Python3 SimpleHTTPServer is a thing, and the
# cgi module handles multipart data nicely.
#
@caspark
caspark / morris-traversal-kth-smallest-in-bst.py
Created February 3, 2018 21:08
Explaining how to use Morris Traversal to find the k'th smallest element in a binary search tree
# Problem:
# Given a binary search tree t with each node having properties left, right
# (the left and right subtrees respectively) and value (the value of that
# node) and an integer k, find the k-th smallest element in the BST using
# constant space.
#
# Example:
# t =
# 3
# / \
@ben-cohen
ben-cohen / shared_mutex.c
Created July 12, 2017 19:25
Mutex in mmap memory shared between processes.
/*
* shared_mutex: Mutex in mmap memory shared between processes.
*
* Ben Cohen, July 2017.
*
* Compile using:
* gcc -o shared_mutex shared_mutex.c -ggdb -Wall -std=c99 -pthread
*
* Two processes are created with an mmap shared memory region
* containing an array of chars and a mutex. The mutex is created with
@vasanthk
vasanthk / System Design.md
Last active May 28, 2024 20:01
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?
@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 19, 2024 17:40
This is my technical interview cheat sheet. Feel free to fork it or do whatever you want with it. PLEASE let me know if there are any errors or if anything crucial is missing. I will add more links soon.

ANNOUNCEMENT

I have moved this over to the Tech Interview Cheat Sheet Repo and has been expanded and even has code challenges you can run and practice against!






\

@Chaser324
Chaser324 / GitHub-Forking.md
Last active May 13, 2024 11:18
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, it's quite easy to make mistakes or not know what you should do when you're initially learning the process. I know that I certainly had considerable initial trouble with it, and I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your repo or j