Skip to content

Instantly share code, notes, and snippets.

@alexhudici
alexhudici / The Technical Interview Cheat Sheet.md
Created February 3, 2017 23:30 — forked from tsiege/The Technical Interview Cheat Sheet.md
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.

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:

  • Stores data elements based on an sequential, most commonly 0 based, index.
  • Based on tuples from set theory.
//*******************************************************************
// Edited with https://www.compilejava.net/
// Static member example
//*******************************************************************
import java.lang.Math; // headers MUST be above the first class
// one class needs to have a main() method
public class HelloWorld
{
@alexhudici
alexhudici / Python OS actions.py
Created May 23, 2017 03:29
Python OS actions created by alexhudici - https://repl.it/ILzI/19
### Use this space to try out ideas and free code ###
#!/usr/bin/python
import json
import os
import time
import sys
import shutil
@alexhudici
alexhudici / generic_json_parsing.go
Last active January 10, 2023 14:56
Example of generic Golang json parsing
package main
import (
"encoding/json"
"reflect"
"fmt"
)
type GenericObj struct {
Overwrite interface{} `json:"overwrite"`
@alexhudici
alexhudici / clean-up-boot-partition-ubuntu.md
Created February 26, 2018 21:25 — forked from ipbastola/clean-up-boot-partition-ubuntu.md
Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Safest way to clean up boot partition - Ubuntu 14.04LTS-x64

Reference

Case I: if /boot is not 100% full and apt is working

1. Check the current kernel version

$ uname -r 
# Creating keys
#
cp -rv /usr/share/doc/openvpn/examples/easy-rsa/2.0/ /config/easy-rsa2
# Edit vars
vi /config/easy-rsa2/vars
cd /config/easy-rsa2/
source ./vars
@alexhudici
alexhudici / gist:d077272a78b44881c1f8e1e154a5fa1e
Created December 20, 2018 21:24 — forked from hiroyuki-sato/gist:67f9577e027cbb00a98f
OpenVPN site-to-site config test
vyos@vyos:~$ show version
Version: VyOS 1.0.4
Description: VyOS 1.0.4 (hydrogen)
Copyright: 2014 SO3 Group
Built by: maintainers@vyos.net
Built on: Mon Jun 16 15:58:49 UTC 2014
Build ID: 1406161558-32e5690
System type: x86 64-bit
Boot via: livecd
Hypervisor: VMware
@alexhudici
alexhudici / pointerstructcopy.go
Created April 14, 2019 00:45
differences in copying pointers to a struct and modifying contents within it
// https://play.golang.org/p/juDjWm9VC44
package main
import "fmt"
type T struct {
Id int
Name string
Flurb []string
}