Skip to content

Instantly share code, notes, and snippets.

@luciascarlet
luciascarlet / Balanced.ini
Last active June 12, 2023 11:58
MacType "Balanced" profile (WinUI-like)
# update v1.1 (see revisions for older version; this has a smoother appearance for both DirectWrite and GDI)
# Use with latest testing version of MacType only.
# Recommended to disable ClearType (not AA) system-wide by setting the FontSmoothingType DWORD to 1 in HKCU/Control Panel/Desktop. Do not do this step if you use Firefox, as it'll cause it to render very crunchy non-antialiased fonts for some text, but it improves Edge/Chrome and Chromium apps.
# Microsoft Edge and Chrome require bypassing the renderer code integrity policy so that vertical AA can be enabled by this profile. More details: https://github.com/snowie2000/mactype/wiki/Google-Chrome
# Additional suggested tweak: use Winaero Tweaker (https://winaero.com/winaero-tweaker/) to change every system font to "Segoe UI Variable Small", if you are using Windows 11. This will make fonts in Win32 UI's consistent with WinUI UI's, where Segoe UI Variable is used. (Windows doesn't use Segoe UI Variable for those by default because the legacy ClearType re
@victorlin
victorlin / github-delete-stale-branches.js
Last active March 20, 2024 02:27
Delete stale branches from the GitHub repo's stale branches page (github.com/user/repo/branches/stale). Originally from https://stackoverflow.com/a/69089905
// Paste in browser console and run
async function deleteStaleBranches(delay=500) {
var stale_branches = document.getElementsByClassName('js-branch-delete-button');
for (var i = 0; i < stale_branches.length; i++)
{
stale_branches.item(i).click();
await new Promise(r => setTimeout(r, delay));
}
}
@IanColdwater
IanColdwater / twittermute.txt
Last active April 22, 2024 17:26
Here are some terms to mute on Twitter to clean your timeline up a bit.
Mute these words in your settings here: https://twitter.com/settings/muted_keywords
ActivityTweet
generic_activity_highlights
generic_activity_momentsbreaking
RankedOrganicTweet
suggest_activity
suggest_activity_feed
suggest_activity_highlights
suggest_activity_tweet
@una
una / text.md
Last active April 12, 2022 03:29
Cleanup Branches
  1. Go to the remote repo and delete outdated branches

  2. Then either:

    • Locally cleanup only merged branches: git branch --merged | grep -v "\*" | xargs -n 1 git branch -d
  • Locally remove fetched, outdated branches: git for-each-ref --format='%(refname:short) %(upstream)' refs/heads/ | awk '$2 !~/^refs\/remotes/' | xargs git branch -D
@twilight-sparkle-irl
twilight-sparkle-irl / webcrack.js
Last active February 5, 2024 09:25
webcrack: mess with webpacked (webpackJsonp) applications
// webcrack, a script that allows you to break webpack.js's sandbox and randomization easily
// made by @yourcompanionAI
// licensed under the trust that you will credit me for my work visibly and other than that you can go have fun with this
// window.wc is the webcrack object
// wc.get gives you the module attached to the id you give it.
// literally just what webpack functions use. not much to it
// this is the basic part of all this, everything else is just to allow you to updateproof your code
// both find functions return modules in this format:
@bendc
bendc / svgo.json
Created August 30, 2016 07:05
Sketch's SVGO Compressor settings
{
"comment": "This is the settings file for the SVGO Compressor Plugin. For more info, please check <https://github.com/BohemianCoding/svgo-compressor>",
"pretty": false,
"indent": 2,
"plugins": [
{
"name": "cleanupAttrs"
},
{
"name": "cleanupEnableBackground"
@borestad
borestad / elcapitan-bootable-usb.sh
Last active January 13, 2016 06:22
Bootable USB Drive for OS X El Capitan
###
# This script assumes 2 things
# 1. One have already downloaded the El Capitan ( /Applications/Install OSX El Capitan.app) installer through Appstore or at leaast put "Install OSX El Capitan.app" into the /Apps folder
# 2. A fresh 8 GB+ USB Memory is inserted and have the name "Untitled"
#
# Installation instructions:
# 1. Insert a USB stick into your computer (it will be totally erased - make sure you backup your important files on that USB)
# 2. Open up a terminal (Terminal.app, iTerm etc)
# 3. Fire up Disk utilities
# - I.e `open /Applications/Utilities/Disk\ Utility.app`
@petervangrieken
petervangrieken / loadCSS
Created March 2, 2015 09:05
Asynchronous font loading
<script defer type="text/javascript">
function loadCSS( href, media ){
link = document.createElement( "link" );
link.href = href;
link.type = "text/css";
link.rel = "stylesheet";
link.media = "only x";
document.getElementsByTagName( "head" )[0].appendChild( link );
@drart
drart / index.js
Last active March 13, 2024 05:30
MIDI to OSC bridge using Node.js
var midi = require('midi');
var input = new midi.input();
console.log(input.getPortCount());
console.log(input.getPortName(1));
//
input.openPort(0);
input.ignoreTypes(false, false, false);
//
input.on('message', function(deltaTime, message) {
midiMessageReceived(message);
@magnusdahlstrand
magnusdahlstrand / Documents folder layout
Created October 26, 2012 12:10
Docpad - setup for multiple languages
/src
/documents
/articles
/gallery
/de
/articles
/gallery
/es
/articles
/gallery