Skip to content

Instantly share code, notes, and snippets.

View schmich's full-sized avatar
:octocat:
May all beings be at ease

Chris Schmich schmich

:octocat:
May all beings be at ease
View GitHub Profile
@schmich
schmich / events.json
Last active February 14, 2024 08:04
blackmagicse.com
[{"title":"The Wildey Theatre ‘Celebrating 25 years of the Supernatural album’","city":null,"mapUrl":null,"linkText":"Get Tickets","linkUrl":"https://ci.ovationtix.com/36241/pr/1192815/pe/11429624","note":null,"startDate":"2024-04-27T01:00:00.000Z","endDate":"2024-04-27T02:00:00.000Z"},{"title":"Private at Joe’s","city":"St. Louis, MO","mapUrl":"https://www.google.com/maps?q=Joe's%20Cafe%20%26%20Art%20Gallery%2C%206014%20Kingsbury%20Ave%2C%20St.%20Louis%2C%20MO%2063112%2C%20USA","linkText":null,"linkUrl":null,"note":null,"startDate":"2024-04-28T00:00:00.000Z","endDate":"2024-04-28T03:00:00.000Z"},{"title":"Missouri State Fairgrounds in Sedalia, Mo","city":"Sedalia, MO","mapUrl":"https://www.google.com/maps?q=Missouri%20State%20Fairgrounds%2C%202503%20W%2016th%20St%2C%20Sedalia%2C%20MO%2065301%2C%20USA","linkText":null,"linkUrl":null,"note":null,"startDate":"2024-09-22T20:00:00.000Z","endDate":"2024-09-22T21:00:00.000Z"}]
@schmich
schmich / workflow.md
Created August 11, 2019 07:34
Multi-machine feature branch git workflow

Machine 1

Create a feature branch and sync it to origin.

git checkout -b person/feature-branch
git push -u

Machine 2

@schmich
schmich / notification.js
Created September 20, 2018 04:53
Cookie clicker audio notification
(new MutationObserver(e => {
if (e && e[0] && e[0].addedNodes && e[0].addedNodes.length > 0) {
if (!window.cookieSound) {
window.cookieSound = new Audio();
window.cookieSound.src = 'https://github.com/schmich/marinara/raw/master/src/audio/f62b45bc.mp3';
}
window.cookieSound.play();
}
})).observe(document.getElementById('shimmers'), { childList: true });
@schmich
schmich / vue.html
Last active June 28, 2018 19:32
Vue quick prototyping template
<!DOCTYPE html>
<html>
<head>
<script src="https://cdn.jsdelivr.net/npm/vue/dist/vue.js"></script>
<style>
</style>
</head>
<body>
<div id="app">
</div>
@schmich
schmich / description.md
Last active March 21, 2018 18:23
Flexbox vertical centering with top overflow limit

Layout

  • Vertically-centered flexbox layout
  • Absolutely-positioned fullscreen container (top/left/right/bottom: 0)
  • On content overflow, content is contained at the top and scrolls to the bottom
  • The crux of the layout:
    • .container { justify-content: space-between; } and .container .content { margin: auto 0; }
    • This allows the content to be centered in the flexbox container while not otherwise overflowing the top
  • The content is positioned just above center with .container .content { padding-bottom: 100px; }
@schmich
schmich / pwned-interactive.rb
Last active October 15, 2021 14:44
Check if a password has been pwned with the Pwned Passwords V2 API
# Check a single password interactively.
# Usage: ruby pwned-interactive.rb
require 'io/console'
require 'open-uri'
require 'digest'
puts "The 5-character prefix of the password's SHA-1 hash will be sent."
puts "For details, see https://www.troyhunt.com/ive-just-launched-pwned-passwords-version-2/"
print 'Password (hidden): '
@schmich
schmich / virtualbox.md
Last active September 26, 2018 18:08
VirtualBox/CentOS setup

Setup host-only networking

This creates a dedicated network between the host and guest, allowing you to SSH and use other network services without the need of an external router.

  • In VirtualBox, edit VM settings and add a second host-only network adapter
  • Log into the guest VM
  • Run ifconfig, note the new adapter's interface name (like enp0s8)
  • Run nmtui
    • Edit a connection > Add > Ethernet
  • Profile name: Host-only Adapter
@schmich
schmich / ducky.md
Last active April 5, 2024 14:20
Programming media keys on the Ducky One 2 Skyline

Programming Media Keys on the Ducky One 2 Skyline

To use media keys on the Ducky One 2 Skyline, you must record a macro to bind the media function to a hotkey combination, i.e. Fn plus some key.

Example

Important: In the instructions below, "Press X+Y+Z" means press and hold key X, press and hold key Y, press and hold key Z in that order, and then release all three.

As an example, to bind Fn+PgUp to the play/pause media function:

@schmich
schmich / shrink.md
Last active January 17, 2018 09:01
Shrink VM drive: VMWare Workstation & CentOS

Guest OS:

xfs_fsr # Defrag.
cat /dev/zero | pv | cat > /zerofile # Write zeroes until space runs out.
sync && shutdown now # Flush and reboot.
rm /zerofile && sync && shutdown now # Remove file, flush, and shutdown.

Host OS:

@schmich
schmich / hosts
Last active August 12, 2017 19:06
Adblock hosts
0.0.0.0 px.moatads.com
0.0.0.0 moatads.com
0.0.0.0 functionalclam.com