Skip to content

Instantly share code, notes, and snippets.

View jolyon129's full-sized avatar
😌
Ready for the next challenge

Jolyon jolyon129

😌
Ready for the next challenge
View GitHub Profile
@jolyon129
jolyon129 / RequestAndResponseLoggingFilter.java
Last active August 10, 2020 06:31 — forked from int128/RequestAndResponseLoggingFilter.java
Spring Web filter for logging request and response
import lombok.extern.slf4j.Slf4j;
import lombok.val;
import org.springframework.http.HttpStatus;
import org.springframework.http.MediaType;
import org.springframework.web.filter.OncePerRequestFilter;
import org.springframework.web.util.ContentCachingRequestWrapper;
import org.springframework.web.util.ContentCachingResponseWrapper;
import javax.servlet.FilterChain;
import javax.servlet.ServletException;
@jolyon129
jolyon129 / vim-diff-against-saved-file.md
Created April 8, 2020 23:38 — forked from dergachev/vim-diff-against-saved-file.md
VIM snippet to show diff of unsaved changes.

Let's say you're editing a file in VIM, and want to see a diff between your current unsaved version and what's on the hard disk. Turns out you can just type this:

:w !git diff --no-index % -

What this does it pipes the whole contents of the current file to the command git diff --no-index % - The % symbol is substituted by vim to be the path to the saved file. The - tells git diff to read from STDIN.

@jolyon129
jolyon129 / iterm2-solarized.md
Created March 27, 2020 20:17 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@jolyon129
jolyon129 / train_valid_split.py
Created January 31, 2019 22:22 — forked from sariabod/train_valid_split.py
Break up training set into train/valid splits.
import pandas as pd
import pathlib
import sys
import uuid
import shutil
df = pd.read_csv('data/train.csv')
f = open("data/labels.csv","a")
@jolyon129
jolyon129 / dabblet.css
Last active August 29, 2015 14:21 — forked from LeaVerou/dabblet.css
Move in a circle without wrapper elements
/**
* Move in a circle without wrapper elements
* Idea by Aryeh Gregor, simplified by Lea Verou
*/
@keyframes rot {
from {
transform: rotate(0deg)
translate(-150px)
rotate(0deg);