Skip to content

Instantly share code, notes, and snippets.

View jhollowe's full-sized avatar
💭
pluggin' and chuggin'

John Hollowell jhollowe

💭
pluggin' and chuggin'
  • NetApp
  • A bubble in space time
View GitHub Profile
@jhollowe
jhollowe / zfs_arc_watch.sh
Last active July 11, 2021 03:48 — forked from CroneKorkN/gist:476778bb669dcb7610ba7f8ac5a930bb
zfs arc hit ratio monitor
#!/bin/bash
# author: louwrentius, jhollowe
# source: http://louwrentius.com/zfs-on-linux-monitor-cache-hit-ratio.html
INTERVAL=${1:-5}
CURRENT_INTERVAL=$INTERVAL
OLDHITS=0
OLDMISS=0
@machuu
machuu / WSL2_VPN_Workaround_Instructions.md
Last active May 8, 2024 13:41
Workaround for WSL2 network broken on VPN

Overview

Internet connection and DNS routing are broken from WSL2 instances, when some VPNs are active.

The root cause seems to be that WSL2 and the VPN use the same IP address block, and the VPN routing clobbers WSL2's network routing.

This problem is tracked in multiple microsoft/WSL issues including, but not limited to:

@cb109
cb109 / vscode_python_sort_imports_isort_on_save.md
Last active June 12, 2023 03:50
VSCode: Python Sort Imports on File Save (isort)

VSCode: Python Sort Imports on File Save (isort)

Problem

VSCode does have support to sort imports inside a .py file using isort. The recommended way to turn this on is via the following settings:

"[python]": {
    "editor.formatOnSave": true,
 "editor.codeActionsOnSave": {
@mutin-sa
mutin-sa / Top_Public_Time_Servers.md
Last active May 10, 2024 14:43
List of Top Public Time Servers

Google Public NTP [AS15169]:

time.google.com

time1.google.com

time2.google.com

time3.google.com

@akhansari
akhansari / tasks.json
Created February 28, 2018 00:23
VSCode task for Hugo with error detection.
{
"version": "2.0.0",
"tasks": [
{
"label": "Hugo",
"type": "shell",
"command": "hugo serve",
"group": "build",
"isBackground": true,
"problemMatcher": {
@xbb
xbb / README
Last active April 17, 2024 20:21
IDRAC6 Virtual Console Launcher
Use this as an example on how to start the virtual console without the need of Java Web Start or accessing it from the web interface.
You can use the user and password that you use for the web interface.
You need an old JRE... I used 1.7.0_80 from the Server JRE package, also I have tested successfully 1.7.0_79 with MacOS.
You don't need to install it, just extract it or copy the files in "jre" folder.
Open the viewer.jnlp file that you get by launching the virtual console from the web interface with a text editor.
Note the urls to the jar files. Download the main jar file avctKVM.jar and the libs for your operating system and architecture.
Extract the dlls (.so Linux, .jnilib MacOS) from the jar libs.
@marcaube
marcaube / harlem-shake.js
Created April 8, 2016 18:04
Harlem Shake, a script to make those XSS dance
// Source: http://pastebin.com/aJna4paJ
javascript:(function(){function c(){var e=document.createElement("link");e.setAttribute("type","text/css");e.setAttribute("rel","stylesheet");e.setAttribute("href",f);e.setAttribute("class",l);document.body.appendChild(e)}function h(){var e=document.getElementsByClassName(l);for(var t=0;t<e.length;t++){document.body.removeChild(e[t])}}function p(){var e=document.createElement("div");e.setAttribute("class",a);document.body.appendChild(e);setTimeout(function(){document.body.removeChild(e)},100)}function d(e){return{height:e.offsetHeight,width:e.offsetWidth}}function v(i){var s=d(i);return s.height>e&&s.height<n&&s.width>t&&s.width<r}function m(e){var t=e;var n=0;while(!!t){n+=t.offsetTop;t=t.offsetParent}return n}function g(){var e=document.documentElement;if(!!window.innerWidth){return window.innerHeight}else if(e&&!isNaN(e.clientHeight)){return e.clientHeight}return 0}function y(){if(window.pageYOffset){return window.pageYOffset}return Math.max(document.documentElement.
@eribeiro
eribeiro / gource-ffmpeg.sh
Last active February 11, 2022 16:23
Run Gource on a git repo, outputs as a movie (movie.mp4) and compresses it (output.mp4)
gource -s .06 -1280x720 --auto-skip-seconds .1 --multi-sampling --stop-at-end --key --highlight-users --hide mouse,progress,files,filenames,dirnames --file-idle-time 0 --max-files 0 --background-colour 000000 --font-size 22 --title "Lucene/Solr" --output-ppm-stream - --output-framerate 30 | avconv -y -r 30 -f image2pipe -vcodec ppm -i - -b 65536K movie.mp4
&& ffmpeg -i movie.mp4 -b:v 3048780 -vcodec libx264 -crf 24 output.mp4
@tessus
tessus / compile_tmux.sh
Last active January 25, 2024 23:37
compile tmux (static)
#!/bin/bash
TMUX_VERSION=2.3
NCURSES_VERSION=6.0
LIBEVENT_VERSION=2.0.22
BASEDIR=${HOME}/work/tmux-static
TMUXTARGET=${BASEDIR}/local
mkdir -p $TMUXTARGET
cd $BASEDIR
@MohamedAlaa
MohamedAlaa / tmux-cheatsheet.markdown
Last active May 10, 2024 16:49
tmux shortcuts & cheatsheet

tmux shortcuts & cheatsheet

start new:

tmux

start new with session name:

tmux new -s myname