Skip to content

Instantly share code, notes, and snippets.

Dan Lüdtke danrl

Block or report user

Report or block danrl

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@danrl
danrl / The Technical Interview Cheat Sheet.md
Last active May 3, 2019 — forked from TSiege/The Technical Interview Cheat Sheet.md
This is TSiege's technical interview cheat sheet. Please find the original and updated at their gist page.
View The Technical Interview Cheat Sheet.md

NOTE Forked from @TSiege on Fri 3. May, 2019

Studying for a Tech Interview Sucks, so Here's a Cheat Sheet to Help

This list is meant to be a both a quick guide and reference for further research into these topics. It's basically a summary of that comp sci course you never took or forgot about, so there's no way it can cover everything in depth. It also will be available as a gist on Github for everyone to edit and add to.

Data Structure Basics

###Array ####Definition:

View graph-bfs-dfs.go
package main
import (
"fmt"
"github.com/danrl/golibby/queue"
"github.com/danrl/golibby/stack"
"github.com/danrl/golibby/graph"
)
View my favorite color
syntax = "proto3";
message GuessRequest {
int32 red = 1;
int32 green = 2;
int32 blue = 3;
}
message GuessResponse {
string result = 1;
View gist:1c1d4782c75e4cd29a516209704522d2
- name: bar.foo
addresses:
literals:
- 2001:db8::1
- name: foo
delegation:
nameservers:
- ns-cloud1.googledomains.com.
- ns-cloud2.googledomains.com.
- ns-cloud3.googledomains.com.
View config.yml
config:
zonedatadirectory: zonedata
defaults:
ttl: 300
managedzones:
- fqdn: example.com.
ttl: 3600
- fqdn: example.org.
View templates.yml
templates:
- template: gmail
description: >
This template adds Google mail servers to a zone.
names:
- name: '@'
mail:
ttl: 604800 # 1 week = 604800 seconds
mailservers:
- mailserver: aspmx.l.google.com.
View zones.yml
zones:
- zone: egym.coffee
description: Test zone.
ttl: 300
templates:
- gmail
- website
names:
- name: '@'
texts:
View orphaned.c
#include <unistd.h>
#include <sys/types.h>
int main(int argc, char *argv[]) {
pid_t pid = fork();
if (pid == 0) {
// child being lazy
sleep(30);
return 0;
}
View zombie.c
#include <unistd.h>
#include <sys/types.h>
#include <sys/wait.h>
int main(int argc, char *argv[]) {
pid_t pid = fork();
if (pid == 0) {
// child exits immediately
return 0;
}
View sleeping.c
#include <unistd.h>
int main(int argc, char *argv[]) {
// wait
sleep(10);
// exit ok
return 0;
}
You can’t perform that action at this time.