Skip to content

Instantly share code, notes, and snippets.

set ignorecase
set smartcase
set scrolloff=3 " 3 lines above/below cursor when scrolling
set idearefactormode=keep
set timeout timeoutlen=3000 ttimeoutlen=100
set incsearch " Highlight search results when typing
set hlsearch " Highlight search results
set relativenumber " relative numbers
set number " current line number as absolute
set surround
@frnkst
frnkst / ckad_bookmarks.html
Created May 16, 2022 10:40
CKAD Exam Bookmarks (all bookmarks you need for the certified kubernetes application developer exam)
<!DOCTYPE NETSCAPE-Bookmark-file-1>
<!-- This is an automatically generated file.
It will be read and overwritten.
DO NOT EDIT! -->
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=UTF-8">
<TITLE>Bookmarks</TITLE>
<H1>Bookmarks</H1>
<DL><p>
<DT><H3 ADD_DATE="1557146110" LAST_MODIFIED="1651689144" PERSONAL_TOOLBAR_FOLDER="true">Bookmarks Bar</H3>
<DL><p>
@frnkst
frnkst / gist:10d6c3df26907603d419a42fdf552822
Created October 28, 2020 09:22
Debug angular component
console.log('component: ', component.fixure.debugElement.nativeElement.innerHTML);
@frnkst
frnkst / honeypot.txt
Created March 12, 2020 15:51
I've set up a honeypot and recorded all unique login attempts
0000:0000
0:0
1111:1111
123456:123456
1234:1234
123:123
123abc:123123abc123
1:1
1andrewscudder:1andrewscudder
3:3
# ccsjson from https://github.com/aramk/CSSJSON
# file index.html
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css" />
<script src="cssjson.js"></script>
<script>
const xhr = new XMLHttpRequest();
# From here: https://github.com/engineer-man/youtube/blob/master/058/commands.sh
# 1. redo last command but as root
sudo !!
# 2. open an editor to run a command
ctrl+x+e
# 3. create a super fast ram disk
mkdir -p /mnt/ram
@frnkst
frnkst / MockTest.java
Last active August 29, 2019 18:11
Mockito Argument Matcher with Generics
import org.junit.Test;
import org.mockito.Matchers;
import org.mockito.Mockito;
import java.util.Arrays;
import java.util.List;
class SomeClass {
public String getResult(List param) {
return "real method called with a list";
@frnkst
frnkst / git-change-commit-messages.md
Created October 2, 2018 20:15 — forked from nepsilon/git-change-commit-messages.md
How to change your commit messages in Git? — First published in fullweb.io issue #55

How to change your commit messages in Git?

At some point you’ll find yourself in a situation where you need edit a commit message. That commit might already be pushed or not, be the most recent or burried below 10 other commits, but fear not, git has your back 🙂.

Not pushed + most recent commit:

git commit --amend

This will open your $EDITOR and let you change the message. Continue with your usual git push origin master.

@frnkst
frnkst / .bash_profile
Created August 26, 2018 21:31 — forked from natelandau/.bash_profile
Mac OSX Bash Profile
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
#
# Sections:
# 1. Environment Configuration
# 2. Make Terminal Better (remapping defaults and adding functionality)
# 3. File and Folder Management
# 4. Searching
# 5. Process Management
function handleReply(ip, symbolicAddress) {
if (timeout) {
clearTimeout(timeout);
}
if (ip) {
const elapsedTime = `${(process.hrtime(startTime)[1] / 1000000).toFixed(3)} ms`;
if (ip === previousIP) {
process.stdout.write(` ${elapsedTime}`);