Skip to content

Instantly share code, notes, and snippets.

View chromano's full-sized avatar

Carlos H. Romano chromano

  • São Carlos, SP, Brazil
  • 09:18 (UTC -03:00)
  • LinkedIn in/chromano
View GitHub Profile
@DmitrySoshnikov
DmitrySoshnikov / dfs-bfs-non-recursive.js
Created October 19, 2015 05:40
Non-recursive DFS and BFS algorithms
/**
* Depth-first and Breadth-first graph traversals.
*
* In this diff we implement non-recursive algorithms for DFS,
* and BFS maintaining an explicit stack and a queue.
*
* by Dmitry Soshnikov <dmitry.soshnikov@gmail.com>
* MIT Style license
*/
@CAFxX
CAFxX / persistent_pipes_linux.md
Last active January 4, 2024 04:32
Persistent pipes/circular buffers for Linux

📂 Persistent "pipes" in Linux

In a project I'm working on I ran into the requirement of having some sort of persistent FIFO buffer or pipe in Linux, i.e. something file-like that could accept writes from a process and persist it to disk until a second process reads (and acknowledges) it. The persistence should be both across process restarts as well as OS restarts.

AFAICT unfortunately in the Linux world such a primitive does not exist (named pipes/FIFOs do not persist

@tsiege
tsiege / The Technical Interview Cheat Sheet.md
Last active May 6, 2024 02:17
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!






\

@mtigas
mtigas / gist:952344
Last active April 3, 2024 07:57
Mini tutorial for configuring client-side SSL certificates.

Client-side SSL

For excessively paranoid client authentication.


Updated Apr 5 2019:

because this is a gist from 2011 that people stumble into and maybe you should AES instead of 3DES in the year of our lord 2019.

some other notes:

@guilhermechapiewski
guilhermechapiewski / colored_tail.sh
Created February 5, 2011 05:22
"tail -f" a log archive with colored output
#!/bin/bash
# Usage: colored_tail.sh [logfile]
tail -f ${1} | perl -pe 's/^\[DEBUG\].*$/\e[35m$&\e[0m/g;s/^\[INFO\].*$/\e[36m$&\e[0m/g;s/^\[WARN\].*$/\e[33m$&\e[0m/g;s/^\[ERROR\].*$/\e[31m$&\e[0m/g;'