Skip to content

Instantly share code, notes, and snippets.

View twhite96's full-sized avatar
☢️
Cookin

tiff twhite96

☢️
Cookin
View GitHub Profile
@twhite96
twhite96 / convert.py
Created February 15, 2024 22:34 — forked from mturilin/convert.py
Converst TextExpander csv to espanso yaml
#!/usr/bin/python3
import yaml
import sys
import csv
# create root yaml
matches = []
# open file
import argparse
import glob
import plistlib
import re
from os import path, mkdir
import yaml
'''
BOOL UnhookNT()
{
BOOL fOk = FALSE;
if (HMODULE hmod = GetModuleHandleW(L"ntdll"))
{
if (PIMAGE_NT_HEADERS pinth = RtlImageNtHeader(hmod))
{
PVOID BaseAddress = (PBYTE)hmod + pinth->OptionalHeader.BaseOfCode;
@twhite96
twhite96 / books.md
Created January 28, 2024 18:38 — forked from abstractart/books.md
Free Programming Ebooks - O'Reilly Media. Codeship free ebooks here - https://bit.ly/2oQ0knQ
@twhite96
twhite96 / create-post.sh
Last active September 2, 2024 05:34
create a Jekyll post with a shell script
#!/bin/bash
# Put posts in the correct directory
directory="src/posts"
# Prompt the user for the frontmatter
read -p "Enter the file title: " file_title
# read -p "Enter the excerpt: " excerpt
read -p "Enter the description: " description
@twhite96
twhite96 / unifi.md
Created December 24, 2023 06:11 — forked from rosco-pc/unifi.md
Unifi commands.md

Unifi AP useful commands

using SSH:

  • log in to AP: $ ssh ubnt@<IP>
  • default username & password: ubnt & ubnt

Generic

Command Example Function
@twhite96
twhite96 / compress-images.yml
Created October 8, 2023 06:15
image compression before deployment
name: compress-images
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: calibreapp/image-actions
runs-on: ubuntu-latest
@twhite96
twhite96 / keycode_mac.h
Created October 1, 2023 05:41 — forked from jfortin42/keycode_mac.h
list of keycode for macos
/* ************************************************************************** */
/* */
/* ::: :::::::: */
/* keycode_mac.h :+: :+: :+: */
/* +:+ +:+ +:+ */
/* By: jfortin <jfortin@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2016/12/17 16:42:55 by jfortin #+# #+# */
/* Updated: 2019/11/10 18:01:39 by jfortin ### ########.fr */
/* */
@twhite96
twhite96 / puppeteer-with-proxy.js
Created August 29, 2023 07:29
Failed puppeteer scraper
const puppeteer = require('puppeteer');
require('dotenv').config()
async function main() {
const browser = await puppeteer.launch({
headless: true,
args: [`--proxy-server=http://scraperapi:${process.env.SCRAPER_API_KEY}@proxy-server.scraperapi.com:8001`]
});
const page = await browser.newPage();
await page.goto('https://whatismyipaddress.com/');
@twhite96
twhite96 / docusaurus.config.js
Last active August 21, 2023 08:10
docusaurus blog option
feedOptions: {
type: 'all',
copyright: `Copyright © ${new Date().getFullYear()} Facebook, Inc.`,
createFeedItems: async (params) => {
const {blogPosts, defaultCreateFeedItems, ...rest} = params;
return defaultCreateFeedItems({
// keep only the 10 most recent blog posts in the feed
blogPosts: blogPosts.filter((item, index) => index < 10),
...rest
});