Skip to content

Instantly share code, notes, and snippets.

@hazelweakly
hazelweakly / cry-more.html
Last active January 8, 2023 07:46
Enron Mullet Is A Giant CryBaby
<!DOCTYPE html>
<meta charset="utf-8" />
<title>Redirecting to the Fediverse</title>
<head>
<script>
// let's say this is hosted at example.com. Given a url of one of the forms:
// - example.com/@user@instance.com/post_id
// - example.com/@user@instance.com
// - example.com/@instance.com
// redirect accordingly
@bodil
bodil / init.ts
Created August 12, 2019 17:34
Snapshot of my vscode-use-package setup
import * as vscode from "vscode";
import { initUsePackage, usePackage, configSet } from "vscode-use-package";
import * as nav from "./nav";
import * as js from "./js";
import * as rust from "./rust";
export function init(context: vscode.ExtensionContext) {
console.log(`HELLO FROM INIT SCRIPT`);
@bradwilson
bradwilson / profile.ps1
Last active March 21, 2024 07:24
Downloadable files for bradwilson.io/blog/prompt/powershell
######## POSH-GIT
# ... Import-Module for posh-git here ...
# Background colors
$GitPromptSettings.AfterStash.BackgroundColor = 0x5F5FAF
$GitPromptSettings.AfterStatus.BackgroundColor = 0x5F5FAF
$GitPromptSettings.BeforeIndex.BackgroundColor = 0x5F5FAF
$GitPromptSettings.BeforeStash.BackgroundColor = 0x5F5FAF
@dburriss
dburriss / print-binding-redirects.ps1
Created February 27, 2018 20:57
Print out the binding redirects in a bin folder. Run from the build output directory.
function Find-Dlls() {
$dlls = Get-ChildItem | ? { $_.Extension -eq '.dll' } | % { [System.Reflection.AssemblyName]::GetAssemblyName($_.FullName).FullName }
return $dlls
}
function Set-Bindings() {
$binding = "<dependentAssembly>
<assemblyIdentity name=`"{0}`" publicKeyToken=`"{2}`" culture=`"neutral`" />
<bindingRedirect oldVersion=`"0.0.0.0-{1}`" newVersion=`"{1}`" />
@mackwage
mackwage / windows_hardening.cmd
Last active July 3, 2024 14:47
Script to perform some hardening of Windows OS
:: Windows 10 Hardening Script
:: This is based mostly on my own personal research and testing. My objective is to secure/harden Windows 10 as much as possible while not impacting usability at all. (Think being able to run on this computer's of family members so secure them but not increase the chances of them having to call you to troubleshoot something related to it later on). References for virtually all settings can be found at the bottom. Just before the references section, you will always find several security settings commented out as they could lead to compatibility issues in common consumer setups but they're worth considering.
:: Obligatory 'views are my own'. :)
:: Thank you @jaredhaight for the Win Firewall config recommendations!
:: Thank you @ricardojba for the DLL Safe Order Search reg key!
:: Thank you @jessicaknotts for the help on testing Exploit Guard configs and checking privacy settings!
:: Best script I've found for Debloating Windows 10: https://github.com/Sycnex/Windows10Debloater
:
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 5, 2024 19:12
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

function isFib(val) {
var check1 = 5 * Math.pow(val, 2) + 4;
var check2 = 5 * Math.pow(val, 2) - 4;
function isPerfectSquare(num) {
return Math.sqrt(num) % 1 === 0;
}
//we see if the checks are perfect squares
var isPerfect1 = isPerfectSquare(check1);