Skip to content

Instantly share code, notes, and snippets.

function FindProxyForURL(url, host) {
// Bypass proxy for local addresses
if (shExpMatch(host, "*.local")) {
return "DIRECT";
}
// Use proxy for all other requests
return "PROXY proxy.example.com:8080";
}
Custom:
Command + Num 1: Terminal
Command + Num 2: Switch projects
Command + Num 3: ?
Command + Num 4: Commit
Command + Num 5: Git log
Command + Num 6: Branches
"" .ideavimrc - Matt Chapman
"" Base Settings
"" ========================================================
set scrolloff=10
set linenumber
set showmode
set showcmd
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";