Skip to content

Instantly share code, notes, and snippets.

View klardotsh's full-sized avatar
🌧️

Josh Klar klardotsh

🌧️
View GitHub Profile
#!/usr/bin/env bash
die() { echo ""; exit; }
pidof cmus >/dev/null || die
statu=`cmus-remote -Q | grep status`
[ "${statu}" == "status playing" ] || die
@klardotsh
klardotsh / cvimrc.vim
Last active April 21, 2018 02:56
cvimrc
set smoothscroll
set noautofocus
set autoupdategist
let mapleader = ","
let barposition = "bottom"
let completionengines = ["duckduckgo"]
let defaultengine = "duckduckgo"
let searchalias g = "google"
@klardotsh
klardotsh / main.rs
Last active October 27, 2016 03:02
use std::thread;
use std::sync::{ Arc, Mutex };
use std::time::Duration;
fn kickoff_background(counter: &Arc<Mutex<u32>>) -> thread::JoinHandle<std::result::Result<(), ()>> {
let counter = counter.clone();
return thread::spawn(move || {
loop {
let mut number = counter.lock().unwrap();
@klardotsh
klardotsh / MongoWTF.sh
Created December 1, 2016 17:07
Restore multiple mongodb databases in one sweep, since mongorestore needs to be told db names to import to
mongo --quiet --eval 'db.getMongo().getDBNames().forEach(function(i){db.getSiblingDB(i).dropDatabase()})'
find ./ -type d -exec basename {} \; | grep -v "\." | parallel mongorestore -d {} {}
coreboot-4a0650d-dirty Thu Jan 26 15:37:34 UTC 2017 verstage starting...
FSP TempRamInit successful
bist: 0x00000000
tsc: 0x0000000000a432c8
CPU: Intel(R) Core(TM) m3-6Y30 CPU @ 0.90GHz
CPU: ID 406e3, Skylake D0, ucode: 00000089
CPU: AES supported, TXT NOT supported, VT supported
MCH: device id 190c (rev 08) is Skylake-Y
@klardotsh
klardotsh / gist:e198ad970bdb2599148541787d5f685e
Created November 9, 2017 17:51
CAROLINE cbmem after normal, cold boot
coreboot-4a0650d-dirty Thu Jan 26 15:37:34 UTC 2017 verstage starting...
FSP TempRamInit successful
bist: 0x00000000
tsc: 0x0000000000a679e6
CPU: Intel(R) Core(TM) m3-6Y30 CPU @ 0.90GHz
CPU: ID 406e3, Skylake D0, ucode: 00000089
CPU: AES supported, TXT NOT supported, VT supported
MCH: device id 190c (rev 08) is Skylake-Y
PCH: device id 9d46 (rev 21) is Skylake-Y Premium
IGD: device id 191e (rev 07) is Skylake ULX GT2
@klardotsh
klardotsh / gist:c6bf064f99628d81a3a5b0a476390b68
Created November 11, 2017 09:18
CAROLINE cbmem, attempt 3
coreboot-4a0650d-dirty Thu Jan 26 15:37:34 UTC 2017 verstage starting...
FSP TempRamInit successful
bist: 0x00000000
tsc: 0x0000000000d82d02
CPU: Intel(R) Core(TM) m3-6Y30 CPU @ 0.90GHz
CPU: ID 406e3, Skylake D0, ucode: 00000089
CPU: AES supported, TXT NOT supported, VT supported
MCH: device id 190c (rev 08) is Skylake-Y

Keybase proof

I hereby claim:

  • I am klardotsh on github.
  • I am klardotsh (https://keybase.io/klardotsh) on keybase.
  • I have a public key whose fingerprint is B0E1 74F9 B754 7520 199D D2D1 7471 B396 A14B 592F

To claim this, I am signing this object:

<section class="text-center">
<h2 id="tmp-title">Fiduciary License Agreement 2.0</h2>
<span id="tmp-subtitle-based">based on the</span>
<h2 id="tmp-subtitle"><span id="tmp-contributor-type">Individual</span> Contributor <span id="tmp-contributor-exclusivity-1">exclusive</span> License Agreement</h2>
<h2 id="tmp-subtitle-patent">(including the <span id="tmp-patent-option">Traditional Patent License</span> OPTION)</h2>
</section>
<p>Thank you for your interest in contributing to <span id="tmp-beneficiary-name">Josh Klar</span>'s <span id="tmp-project-name">kmk_firmware</span> ("We" or "Us").</p>
<p>The purpose of this contributor agreement ("Agreement") is to clarify and document the rights granted by contributors to Us. To make this document effective, please follow the instructions at <span id="tmp-submission-instructions">https://cla-assistant.io/</span>.</p>
@klardotsh
klardotsh / kmk_firmware_cla_2018-10-25.md
Last active October 26, 2018 04:55
KMK Firmware CLA

Fiduciary License Agreement 2.0

based on the

Individual Contributor exclusive License Agreement

(including the Traditional Patent License OPTION)