Skip to content

Instantly share code, notes, and snippets.

class Foo {
public static void main(String[] args) {
System.getProperty("java.library.path");
}
}
/*! highlight.js v9.9.0 | BSD3 License | git.io/hljslicense */
!function (e) { var t = "object" == typeof window && window || "object" == typeof self && self; "undefined" != typeof exports ? e(exports) : t && (t.hljs = e({}), "function" == typeof define && define.amd && define([], function () { return t.hljs })) }(function (e) {
function t(e) { return e.replace(/[&<>]/gm, function (e) { return L[e] }) } function r(e) { return e.nodeName.toLowerCase() } function a(e, t) { var r = e && e.exec(t); return r && 0 === r.index } function n(e) { return C.test(e) } function i(e) { var t, r, a, i, s = e.className + " "; if (s += e.parentNode ? e.parentNode.className : "", r = E.exec(s)) return y(r[1]) ? r[1] : "no-highlight"; for (s = s.split(/\s+/), t = 0, a = s.length; a > t; t++)if (i = s[t], n(i) || y(i)) return i } function s(e, t) { var r, a = {}; for (r in e) a[r] = e[r]; if (t) for (r in t) a[r] = t[r]; return a } function c(e) { var t = []; return function a(e, n) { for (var i = e.firstChild; i; i = i.next
@jasonekratz
jasonekratz / rules.txt
Last active May 30, 2019 18:17
AdGuard rules.txt
theverge.com##a.p-comment-notification.has-content
theverge.com##section#comments
theverge.com##span.c-byline__item > div.c-entry-stat--words
arstechnica.com##div.comments-hotness
arstechnica.com###comments-area
arstechnica.com##a.comment-count.icon-comment-bubble-down
ghacks.net##div#comments
youtube.com##.style-scope.ytd-comments
macrumors.com##.comments
macrumors.com###comments
  1. git lfs install
  2. clone repo
  3. checkout branch(es) that you want to migrate
  4. remove remotes
    • git remote remove <remote name>
  5. git lfs migrate import --include="*.uasset","*.umap","*.lib" --everything
    • --include has example file types.
    • --everything will do all branches
  6. create new remote repo
  7. add remote(s) back in git remote add origin for new repo created above
@jasonekratz
jasonekratz / showuntagged.md
Last active December 2, 2019 00:15
DEVONthink 3 - show untagged items

Create a new Smart Group with the following rules:

  1. All of the following are true
    1. Kind is Any Document
    2. Item is not Tagged
on alfred_script(q)
tell application "iTerm" to activate
tell application "iTerm"
tell first session of current tab of current window
write text q
end tell
end tell
end alfred_script
@jasonekratz
jasonekratz / Drafts-Sync-Tags.js
Last active June 26, 2020 00:06
Action for Drafts App, https://getdrafts.com , to update the applied tags to match a line of hashtags on the last line of the draft. Also in the Drafts Directory here https://actions.getdrafts.com/a/10l
let lastLine = draft.lines[draft.lines.length- 1];
if(lastLine.startsWith('#')) {
let re = /#([\w]+)/g;
let hashtags = [...lastLine.matchAll(re)];
let newtags = []
// because matchAll is returning both the full hashtag and the text just get the text
@jasonekratz
jasonekratz / sh-pipeline-win10.md
Last active September 15, 2022 11:09
Run Jenkins pipeline build using 'sh' step on 64-bit Windows 10

Run Jenkins pipeline build using 'sh' step on 64-bit Windows 10

Test script

pipeline {
    agent any

    stages {
 stage('Hello') {
@jasonekratz
jasonekratz / README.md
Last active September 30, 2022 21:26
Debugging Fastify Applications with Panic's Nova on Mac and Fastify CLI

Debugging Fastify Applications with Panic's Nova on Mac and Fastify CLI

The documentation for Panic's Nova 9 for debugging Node (or in general) is atrocious so I'll share how I was able to debug a local node/Fastify application using Fastify CLI. It's actually pretty simple.

Note: This obviously requires having installed Fastify CLI. In my screenshot I am using a copy of Fastify CLI that is local to my application folder, not a global install. If you're using a global Fastify CLI install the path is likely different to the cli.js. For instance with Homebrew on the Mac the path would be likely be /opt/homebrew/lib/node_modules/fastify-cli/cli.js.

Note: The folder to your "app.js" might be different. I'm writing my app in TypeScript so it's being compiled to JavaScript in the dist folder.

Here is a screenshot of my setup:

@jasonekratz
jasonekratz / weblog-dot-lol-notes.md
Created January 31, 2023 18:14
weblog.lol Notes

Notes on the weblog.lol posts feature:

  • "Slug:" in the post front matter will not be sluggified. Would be nice to have that happen automatically no matter what is put in there.

Would love for this system to kind of mirror Blot.im in how you can determine the dates of posts, either via front matter or by the folder structure/filename.


Front matter options