Skip to content

Instantly share code, notes, and snippets.

AddCSLuaFile()
do -- override type functions
gtype = type
local getmetatable = getmetatable
local rawequal = rawequal
getmetatable("").MetaName = "string"
solver=LAMBDA(grid,
LET(
numbers, SEQUENCE(9),
numgrid, SEQUENCE(9,9,0),
vgrid, TOCOL(grid*1),
pos, XMATCH(0,vgrid)-1,
IF(
ISNA(pos), grid,
LET(
i,INT(pos/9),
@hiaux0
hiaux0 / file-mime-types.ts
Last active April 23, 2024 20:43
Typescript Enum for file mime types
// https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types
enum MimeTypes {
".aac" = "audio/aac",
".abw" = "application/x-abiword",
".arc" = "application/x-freearc",
".avi" = "video/x-msvideo",
".azw" = "application/vnd.amazon.ebook",
".bin" = "application/octet-stream",
".bmp" = "image/bmp",
@tomnomnom
tomnomnom / alert.js
Last active April 23, 2024 20:42
Ways to alert(document.domain)
// How many ways can you alert(document.domain)?
// Comment with more ways and I'll add them :)
// I already know about the JSFuck way, but it's too long to add (:
// Direct invocation
alert(document.domain);
(alert)(document.domain);
al\u0065rt(document.domain);
al\u{65}rt(document.domain);
window['alert'](document.domain);
@Michal-Mikolas
Michal-Mikolas / bookmarklets.js
Last active April 23, 2024 20:43
My Bookmarklets
// https://katanya.co.uk/labs/bookmarklet-generator
fetch('https://api.github.com/gists/77dabbdbf39f57fe6816dc9e00866bb9?rand=' + Math.ceil(Math.random()*9999))
.then(response => response.json())
.then(data => {
var scriptContent = data.files['bookmarklets.js'].content;
scriptContent = scriptContent.replaceAll('{{ID}}', '');
scriptContent = scriptContent.replaceAll('{{SECURITY_KEY}}', '');
const scriptFn = new Function(scriptContent);
scriptFn();
@crystianwendel
crystianwendel / DBHelper.cs
Last active April 23, 2024 20:41
DB Helper Class in C#
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.Collections.Generic;
using System.Collections.Specialized;
namespace Helpers
@gtx28
gtx28 / Pimox7to8.txt
Last active April 23, 2024 20:40
Pimox7 to PVE8 upgrade
***Pi-Mox setup on raspberry pi 4b (cm4 you will need add the appropriate steps for your hw setup)
***None of this is "Prod" ready so use at your own risk, your VM's/Containers are your own responsibility. You should already have adequate backups etc.
***Raspberry PI OS setup
Install raspbian x64 lite on raspberry pi
pull the latest copy of Raspberry PI OS x64 lite based on debian 11 bullseye from here: https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
open imager, click choose os, scroll to the bottom and select custom. open the image "2023-05-03-raspios-bullseye-arm64-lite.img.xz"
@gtx28
gtx28 / pve8arm-fresh.txt
Last active April 23, 2024 20:39
PVE8-ARM fresh install
***Pi-Mox8 setup on raspberry pi 4b (cm4 you will need to add the appropriate steps for your hw setup)
***Raspberry PI OS setup
***Install raspbian x64 lite on raspberry pi
pull the latest copy of Raspberry Pi Imager, from here https://www.raspberrypi.com/software/ and Raspberry PI OS x64 lite based on debian 11 bullseye from here: https://www.raspberrypi.com/software/operating-systems/#raspberry-pi-os-64-bit
open imager, click choose os, scroll to the bottom and select custom. open the image "2023-05-03-raspios-bullseye-arm64-lite.img.xz"
{
"meta": {
"theme": "elegant"
},
"basics": {
"name": "Thomas Davis",
"label": "Web Developer",
"image": "https://avatars0.githubusercontent.com/u/416209?s=460&u=38f220a2c9c658141804f881c334c594eb1642ac&v=4",
"summary": "I'm a full stack web developer who can build apps from the ground up. I've worked mostly at startups so I am used to wearing many hats. I am a very product focused developer who prioritizes user feedback first and foremost. I'm generally very flexible when investigating new roles. ",
"website": "https://lordajax.com",
@hello-josh
hello-josh / remove-whitespace.md
Last active April 23, 2024 20:37
How to remove whitespace changes from a branch for a PR

How to remove whitespace-only changes from a PR

  1. Create a new local branch that will contain your changes without the whitespace

    git checkout -b tmp-branch

  2. Merge the changes that contain whitespace into your current branch WITHOUT committing the changes

    git merge --no-commit