Skip to content

Instantly share code, notes, and snippets.

@yavorski
yavorski / thinkpad.md
Last active March 31, 2019 17:46
debian/thinkpad
# make bootable usb
λ dd if=<file> of=<device> bs=4M; sync
λ dd if=debian.iso of=/dev/sda1 bs=4M status=progress; sync
# tlp
# https://linrunner.de/en/
# add to **/etc/apt/sources.list**
@yavorski
yavorski / sample-auth-rest.js
Last active March 14, 2019 12:13 — forked from joshbirk/samplerest.js
Sample of using passport w/ mult strategies
var fs = require("fs")
var ssl_options = {
key: fs.readFileSync('privatekey.pem'),
cert: fs.readFileSync('certificate.pem')
};
var port = process.env.PORT || 3000;
var express = require('express');
var ejs = require('ejs');
var passport = require('passport')
@yavorski
yavorski / remap-capslock-to-control-win10.md
Last active February 1, 2022 15:50 — forked from joshschmelzle/remap-capslock-to-control-win10.md
Remap Caps Lock to Control on Windows 10

Create a new binary value in HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout named Scancode Map

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Keyboard Layout]
"Scancode Map"=hex:00,00,00,00,00,00,00,00,02,00,00,00,1d,00,3a,00,00,00,00,00

or use PowerShell (run as Admin)

@yavorski
yavorski / install-gnome-extension.md
Last active March 31, 2019 20:03
install-gnome-extension

install gome extension

cd in extension directory

cd ~/my-ext

obtain extension UUID

@yavorski
yavorski / debian.md
Last active March 31, 2019 22:27
debian

debian buster

/etc/apt/sources.list

# debian /etc/apt/sources.list

deb https://deb.debian.org/debian buster main contrib non-free
deb-src https://deb.debian.org/debian buster main contrib non-free
export const parallel = (tasks, fn) => Promise.all(tasks.map(task => fn(task)));
export const serial = (tasks, fn) => tasks.reduce((promise, task) => promise.then(previous => fn(task, previous)), Promise.resolve(null));
export const concurrent = async (tasks, fn, limit = 8) => {
const chunks = Array.from(Array(Math.ceil(tasks.length / limit))).map((x, i) => tasks.slice(i * limit, i * limit + limit));
for (const chunk of chunks) {
await Promise.all(chunk.map((task) => fn(task)));
}
};
@yavorski
yavorski / rofi-help.sh
Last active October 27, 2019 12:25
rofi-help-output
$ rofi -modi "window,windowcd,drun,run,ssh,combi,keys" -show drun -theme Monokai -theme-str "window { border: 10; border-color: #161616; }" -font "Source Code Pro Bold 10" -help
# # # # # # # # # # # # # # # # # # # # # # # #
rofi usage:
rofi [-options ...]
Command line only options:
-no-config Do not load configuration, use default values.
-v,-version Print the version number and exit.

Show protocol "http(s)" and "www" in

chrome://flags/#omnibox-ui-hide-steady-state-url-scheme
chrome://flags/#omnibox-ui-hide-steady-state-url-trivial-subdomains

Set this flag to disabled, for showing them.

Show normal tabs

@yavorski
yavorski / all.txt
Created January 13, 2020 19:35 — forked from jhaddix/all.txt
all wordlists from every dns enumeration tool... ever. Please excuse the lewd entries =/
This file has been truncated, but you can view the full file.
.
..
........
@
*
*.*
*.*.*
🐎