Skip to content

Instantly share code, notes, and snippets.

View 0x4007's full-sized avatar
🕶️
shadowy super pull request reviewing

アレクサンダー.eth 0x4007

🕶️
shadowy super pull request reviewing
View GitHub Profile
ln -s /Applications/Visual\ Studio\ Code.app/Contents/Resources/app/bin/code /usr/local/bin/vsc
@0x4007
0x4007 / disable-ds-store.sh
Created June 25, 2019 03:56
Disable .DS_Store
defaults write com.apple.desktopservices DSDontWriteNetworkStores true
@0x4007
0x4007 / apt.sh
Created July 4, 2019 03:02
Auto Upgrade OS
dpkg --configure -a && sudo apt-get update
yes | apt-get upgrade
yes | apt autoremove
sudo spctl --master-disable
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.34.0/install.sh | bash
. ~/.nvm/nvm.sh
nvm install node
node -e "console.log('Running Node.js ' + process.version)"
git diff --summary | grep --color 'mode change 100755 => 100644' | cut -d' ' -f7- | xargs chmod +x
git diff --summary | grep --color 'mode change 100644 => 100755' | cut -d' ' -f7- | xargs chmod -x
@0x4007
0x4007 / tac automate.js
Created October 6, 2020 06:28
automate clicking 0 amount approval after doing one manually on https://tac.dappstar.io/
const buffer = [];
function queue(e) {
buffer.push(e);
}
document.querySelectorAll(
`#root >
div >
div >
table >
javascript:(function () {
const id = "inDomConsole";
if (document.getElementById(id) === undefined) return;
const consoleElement = document.createElement("details");
consoleElement.id = id;
const scopedStyle = document.createElement("style");
const container = document.createElement("div");
scopedStyle.textContent = `
#${id} {
@0x4007
0x4007 / clear-evidence.sh
Created September 23, 2022 12:54
Rip a file out of git history
git filter-branch -f --index-filter 'git rm --cached --ignore-unmatch *.sql'
@0x4007
0x4007 / discord-server-management-tools.js
Created October 5, 2022 11:39
Made some tools to help mass delete Discord servers off of my account
(function scrapeServers() {
const servers = document.querySelectorAll(`[data-list-item-id^="guildsnav___"]`);
// console.log(servers);
const database = {};
servers.forEach(server => {
const guildsnav = server.getAttribute(`data-list-item-id`);
const serverId = guildsnav.match(/\d+$/igm)?.pop();
if (!serverId) { return }