Skip to content

Instantly share code, notes, and snippets.

View twhite96's full-sized avatar
☢️
Cookin

tiff twhite96

☢️
Cookin
View GitHub Profile
@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
});
Large Object Motions:
(
)
{
}
[[
[]
][
]]
[m
@twhite96
twhite96 / starcounter.js
Created April 17, 2023 07:34 — forked from yyx990803/starcounter.js
Count your total stars!
var https = require('https'),
user = process.argv[2],
opts = parseOpts(process.argv.slice(3))
request('/users/' + user, function (res) {
if (!res.public_repos) {
console.log(res.message)
return
}
var pages = Math.ceil(res.public_repos / 100),
########################################
# Fix this, it leaks RAM like crazytown.
# Freed 6G of RAM immediately after
# removing this card! --spencer
########################################
id: crooked_status
type: custom:config-template-card
variables:
- states['sensor.disk_use_percent'].state
@twhite96
twhite96 / skew-highlight-on-text.css
Last active March 7, 2023 07:34
Skew highlights on text
h1 span {
position: relative;
z-index: 1;
}
h1 span::before {
content: "";
position: absolute;
top: 0;
bottom: 0;
left: -5px;
@twhite96
twhite96 / image-opt.yml
Last active February 4, 2023 23:35
Image opt workflow
name: ci
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build:
name: calibreapp/image-actions
runs-on: ubuntu-latest
@twhite96
twhite96 / nested-object-destructuring.js
Created November 24, 2022 05:09
Nested object destructuring
const cats = {
one: {
name: "Molly",
owner: "Fred Larkin",
color: "Brown",
age: 10,
kittens: 0
},
two: {
name: "Bob",
@twhite96
twhite96 / example.js
Created January 22, 2020 15:03 — forked from hwangbible/example.js
Scriptablify - lets you require('modules') in Scriptable app!
// Variables used by Scriptable.
// These must be at the very top of the file. Do not edit.
// icon-color: gray; icon-glyph: magic;
// Defaults to the latest version and no automatic update; if the file exists, just use it
const moment = await require('moment');
// Use any SemVer options to specify a version you want
// Refer to the calculator here: https://semver.npmjs.com/
const lodash = await require('lodash@^3.9.1');