Skip to content

Instantly share code, notes, and snippets.

// ==UserScript==
// @name TweetXer
// @namespace https://github.com/lucahammer/tweetXer/
// @version 0.9.3
// @description Delete all your Tweets for free.
// @author Luca,dbort,pReya,Micolithe,STrRedWolf
// @license NoHarm-draft
// @match https://x.com/*
// @match https://mobile.x.com/*
// @match https://twitter.com/*

Trying to convert a plist file to JSON but plutil is giving you a hard time?

I want the CellBroadcast as JSON:

plutil -extract CellBroadcast json -o - test.plist

That fails despite it should not:

test.plist: invalid object in plist for destination format
@mbartelsm
mbartelsm / readme.md
Last active April 13, 2025 11:45
VSCode context menu to open WSL

I'm tired of always struggling to open a folder in VSCode using WSL. You normally have to open the current folder in Code, wait for it to load, then reopen in the remote, which closes and reopens Code, so you have to wait for it to load everything once more. The alternative is to open a WSL shell, which takes it's good time too, navigate via the terminal to the folder you want, then open Code.

I just want to right click and be done. So I arranged a little something.

DISCLAIMER Before you proceed, back up your registry. If something breaks, that's on you for not having a backup.

This registry file will delete the current context menu entry for VSCode and replace is with a submenu that lets you choose wether to open it up normally, or via WSL. It only works when right clicking on a folder or on the background.

Something you might want to do before running it is to verify that the installation paths are the same ones you have in your set-up. If you don't have WSL in your PATH, you will either need to edi

@dalei2019
dalei2019 / iterm2-send-zmodem.sh
Last active April 13, 2023 17:49
iterm2 send zmodem clone from [email protected]
#!/bin/bash
# Author: Matt Mastracci ([email protected])
# AppleScript from http://stackoverflow.com/questions/4309087/cancel-button-on-osascript-in-a-bash-script
# licensed under cc-wiki with attribution required
# Remainder of script public domain
osascript -e 'tell application "iTerm2" to version' > /dev/null 2>&1 && NAME=iTerm2 || NAME=iTerm
if [[ $NAME = "iTerm" ]]; then
FILE=`osascript -e 'tell application "iTerm" to activate' -e 'tell application "iTerm" to set thefile to choose file with prompt "Choose a file to send"' -e "do shell script (\"echo \"&(quoted form of POSIX path of thefile as Unicode text)&\"\")"`
else
@dalei2019
dalei2019 / iterm2-recv-zmodem.sh
Last active April 13, 2023 17:49
iterm2 recv zmodem clone from [email protected]
#!/bin/bash
# Author: Matt Mastracci ([email protected])
# AppleScript from http://stackoverflow.com/questions/4309087/cancel-button-on-osascript-in-a-bash-script
# licensed under cc-wiki with attribution required
# Remainder of script public domain
osascript -e 'tell application "iTerm2" to version' > /dev/null 2>&1 && NAME=iTerm2 || NAME=iTerm
if [[ $NAME = "iTerm" ]]; then
FILE=$(osascript -e 'tell application "iTerm" to activate' -e 'tell application "iTerm" to set thefile to choose folder with prompt "Choose a folder to place received files in"' -e "do shell script (\"echo \"&(quoted form of POSIX path of thefile as Unicode text)&\"\")")
else
@xmeng1
xmeng1 / wsl2-network.ps1
Created July 14, 2019 06:50
WSL2 Port forwarding port to linux
$remoteport = bash.exe -c "ifconfig eth0 | grep 'inet '"
$found = $remoteport -match '\d{1,3}\.\d{1,3}\.\d{1,3}\.\d{1,3}';
if( $found ){
$remoteport = $matches[0];
} else{
echo "The Script Exited, the ip address of WSL 2 cannot be found";
exit;
}
@ian-p-cooke
ian-p-cooke / add_wsl_exclusions.ps1
Last active June 30, 2024 05:27
powershell script to add WSL exclusions
$win_user = "ipc"
$linux_user = "ipc"
$package = "CanonicalGroupLimited.Ubuntu18.04onWindows_79rhkp1fndgsc"
$base_path = "C:\Users\" + $win_user + "\AppData\Local\Packages\" + $package + "\LocalState\rootfs"
$dirs = @("\bin", "\sbin", "\usr\bin", "\usr\sbin", "\home\" + $linux_user + "\.cargo\bin")
$dirs | ForEach { Add-MpPreference -ExclusionProcess ($base_path + $_ + "\*") }
Add-MpPreference -ExclusionPath $base_path
@lukasnellen
lukasnellen / 00-ssh-tmux-iterm.md
Last active September 20, 2024 07:06
Summary of my remote tmux and ssh configuration to benefit from the iterm2-tmux integration, with ssh authentication socket refreshing

Configuration to use remote tmux over ssh in iterm

This is a compilation of information I found in different postings on the net.

All manual invocation

Basic remote tmux session

tmux can be invoked in command mode using tmux -CC. The simplest way to get a remote tmux session into a window of iterm is to invoke it on the remote host

@gene1wood
gene1wood / recaptchalib.php
Last active January 4, 2019 20:23
This is a backwards compatible recaptchalib.php which talks to reCAPTHA v2 but uses v1 library functions
<?php
/*
* This is a PHP library that handles calling reCAPTCHA v2.
* This library is backwards compatible with the old reCAPTCH v1 recaptchalib.php
* by surfacing the recaptcha_check_answer and recaptcha_get_html functions.
* https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/recaptcha/recaptcha-php-1.11.zip
*/
/**
@chrismdp
chrismdp / achievements.sh
Last active June 7, 2017 15:39
ImagicMagick + Shell script to generate my Kickstarter reward chart on this campaign: https://www.kickstarter.com/projects/chrismdp/ealdorlight?ref=2q0zxb
#!/bin/bash
TITLE_BG=title-bg.png
EL_BG=el-circle.png
OUT=achievements.png
# A colon-seperated rewards list.
# First column is the type of reward:
# <text> - a text number.
# Columns are alpha divisor (eg 4 is 25%), percentage complete, big number, smaller label and text description.