Skip to content

Instantly share code, notes, and snippets.

View DerKobe's full-sized avatar

Philip Claren DerKobe

View GitHub Profile
@rynomad
rynomad / chatGPT de-spinner
Last active April 28, 2023 20:55
highlight and drag this code into your bookmark bar. If that doesn't work, ask chatGPT how to make a bookmarklet
javascript:(function() {
function extractText(element) {
if (element.nodeType === Node.TEXT_NODE) {
return element.textContent.trim() + ' ';
}
if (element.nodeType !== Node.ELEMENT_NODE) {
return '';
}
let text = '';
for (const child of element.childNodes) {
@RadValentin
RadValentin / linebreak-style.md
Created March 4, 2017 15:19
How to stop ESLint/XO CRLF linebreak-style warnings in Windows

If you clone a git repo that enforces a linebreak-style: unix on a Windows machine then ESLint will probably throw the warning below even if you've made no local changes.

Expected linebreaks to be LF but found CRLF.  linebreak-style

In order to fix this you'll need to tell git to default to Unix style line endings rather that OS defaults.

git config --global core.eol lf
git config --global core.autocrlf input
@henrik
henrik / deploying_phoenix_on_dokku.md
Last active April 14, 2024 00:32
Deploying Elixir's Phoenix Framework on Dokku.

Deploying Phoenix on Dokku

Worked 2015-09-08 for Phoenix 1.0.1 on Dokku 0.3.25.

These instructions assume you've set up Dokku. If not, go find a tutorial for that part. My notes for setting it up on Digital Ocean.

On your local machine, in the app's repo

Create a Dokku app:

@henrik
henrik / dokku_on_digital_ocean.md
Last active May 12, 2022 14:38
Notes from running Dokku on Digital Ocean.

My notes for Dokku on Digital Ocean.

These may be a bit outdated: Since I originally wrote them, I've reinstalled on a newer Dokku and may not have updated every section below.

Commands

Install dokku-cli (gem install dokku-cli) for a more Heroku-like CLI experience (dokku config:set FOO=bar).

# List/run commands when not on Dokku server (assuming a "henroku" ~/.ssh/config alias)

ssh henroku dokku

@kevin-smets
kevin-smets / iterm2-solarized.md
Last active July 21, 2024 08:34
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

@1st8
1st8 / gist:3128135
Created July 17, 2012 08:47
God process monitoring + Upstart + rbenv
description "God Process Monitoring"
author "Christoph Geschwind <christoph@mixxt.net>"
start on runlevel [2345]
stop on runlevel [!2345]
respawn # respawn the service if it dies
respawn limit 5 10 # stop respawning if it fails 5 times in 10 seconds
pre-start script