Skip to content

Instantly share code, notes, and snippets.

View nitrohorse's full-sized avatar
↪️
Projects moved to https://gitlab.com/users/nitrohorse/projects

nitrohorse nitrohorse

↪️
Projects moved to https://gitlab.com/users/nitrohorse/projects
View GitHub Profile
@yogthos
yogthos / reddit-video.cljs
Last active January 24, 2021 21:03
a Lumo script for downloading Reddit videos using youtube-dl
#!/usr/bin/env lumo
(ns reddit-video.core
(:require
[cljs.core :refer [*command-line-args*]]
[clojure.string :as string]))
(def https (js/require "https"))
(def process (js/require "child_process"))
(defn js->edn [data]
@binaryoverload
binaryoverload / AuthyToOtherAuthenticator.js
Last active September 20, 2022 21:31 — forked from JacobJohansen/AuthyToOtherAuthenticator.md
Export TOTP tokens from Authy
/* base32 */
/*
Copyright (c) 2011, Chris Umbel
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
@gvlx
gvlx / Windows 10 Decrapifier, 1803_1809.ps1
Last active January 21, 2024 22:23
Windows 10 Decrapifier
#Windows 10 Decrapifier 1803/1809
#By CSAND
#Oct 5 2018
#
#
#PURPOSE: Eliminate much of the bloat that comes with Windows 10.
#
# Change many privacy settings to be off by default. Remove
# built-in advertising, Cortana, OneDrive, Cortana stuff
# (all optional).
@pjobson
pjobson / plex_media_permissions_4_noobies.md
Last active April 21, 2024 21:37
Plex Media Permissions for Linux Noobies

Plex Media Permissions for Linux Noobies

There is no problem with being a noobie and I do not use the term to sligtht or disparage anyone.

This is a way to setup your permissions for running Plex in Linux. Different folks may use different methods.

The permissions concepts provided here apply to OSX, but the users and groups are controlled and modified differently, so much of this will not work properly. I think the command is dscl, but that could be out of date.

There are many ways to setup your permissions scheme in Linux, this methodology describes a way to do it, not everyone will like it, but it works for me, so whatever.

function levelOrderSearch(rootNode) {
// Check that a root node exists.
if (rootNode === null) {
return;
}
// Create our queue and push our root node into it.
var queue = [];
queue.push(rootNode);

How to contact me in a relatively secure manner

Here are some moderately secure methods for contacting me.

Easiest methods

My Signal username is schlink.16.

My Keybase username is @schlink.

@joepie91
joepie91 / express-server-side-rendering.md
Last active February 20, 2024 20:52
Rendering pages server-side with Express (and Pug)

Terminology

  • View: Also called a "template", a file that contains markup (like HTML) and optionally additional instructions on how to generate snippets of HTML, such as text interpolation, loops, conditionals, includes, and so on.
  • View engine: Also called a "template library" or "templater", ie. a library that implements view functionality, and potentially also a custom language for specifying it (like Pug does).
  • HTML templater: A template library that's designed specifically for generating HTML. It understands document structure and thus can provide useful advanced tools like mixins, as well as more secure output escaping (since it can determine the right escaping approach from the context in which a value is used), but it also means that the templater is not useful for anything other than HTML.
  • String-based templater: A template library that implements templating logic, but that has no understanding of the content it is generating - it simply concatenates together strings, potenti

Oh my zsh.

Install with curl

sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

Enabling Plugins (zsh-autosuggestions & zsh-syntax-highlighting)

  • Download zsh-autosuggestions by
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###
@telekosmos
telekosmos / uniq.js
Last active November 15, 2022 17:13
Remove duplicates from js array (ES5/ES6)
var uniqueArray = function(arrArg) {
return arrArg.filter(function(elem, pos,arr) {
return arr.indexOf(elem) == pos;
});
};
var uniqEs6 = (arrArg) => {
return arrArg.filter((elem, pos, arr) => {
return arr.indexOf(elem) == pos;
});