Skip to content

Instantly share code, notes, and snippets.

@SilverEzhik
SilverEzhik / Disable Homebrew auto-update every time you run it.md
Last active Feb 6, 2020
Disable Homebrew auto-update every time you run it
View Disable Homebrew auto-update every time you run it.md

Homebrew does something annoying and does its long update process almost every time you run it, which is irritating.

Here's a way to fix it while still keeping auto-updating on.

Add this to your .bashrc or equivalent:

HOMEBREW_NO_AUTO_UPDATE=1
@SilverEzhik
SilverEzhik / Fix DuckDuckGo middle click.js
Last active Aug 29, 2019
Fix DuckDuckGo middle click. What the heck is that JavaScript madness?
View Fix DuckDuckGo middle click.js
// ==UserScript==
// @name Fix DuckDuckGo middle click
// @description What the heck is that JavaScript madness?
// @include https://*duckduckgo.com/*
// @version 1
// @grant none
// @run-at document-idle
// ==/UserScript==
function undoClicky() {
@SilverEzhik
SilverEzhik / Mac OS Mojave Language Switcher (+ more) Dark Menu Bar Fix.txt
Created Jul 10, 2019
To fix the language switcher and other stuff like the notifications and Spotlight in Mac OS with hybrid dark mode (dark menu bar and light theme apps), do this.
View Mac OS Mojave Language Switcher (+ more) Dark Menu Bar Fix.txt
To fix the language switcher and other stuff like the notifications and Spotlight in Mac OS with hybrid dark mode (dark menu bar and light theme apps), do this:
defaults write com.apple.HIToolbox NSRequiresAquaSystemAppearance -bool no
defaults write com.apple.notificationcenterui NSRequiresAquaSystemAppearance -bool no
defaults write com.apple.menuextra.textinput NSRequiresAquaSystemAppearance -bool no
defaults write com.apple.TISwitcher NSRequiresAquaSystemAppearance -bool no
defaults write com.apple.Spotlight NSRequiresAquaSystemAppearance -bool no
@SilverEzhik
SilverEzhik / Disable Dark Mode in Firefox.txt
Created Jul 10, 2019
If you are using Firefox and a dark theme on your OS, to prevent the prefers-color-scheme media query from making websites go dark, do this.
View Disable Dark Mode in Firefox.txt
If you are using Firefox and a dark theme on your OS, to prevent the prefers-color-scheme media query from making websites go dark, do this:
1. Go to about:config
2. Right Click > New > Integer
3. Set it to:
Name - ui.systemUsesDarkTheme
Value - 0
Then restart Firefox.
@SilverEzhik
SilverEzhik / Vim Launcher.scpt
Last active Mar 14, 2019 — forked from charlietran/TerminalVim.scpt
Double click files to open them in vim in a new iTerm window.
View Vim Launcher.scpt
on run {input, parameters}
-- handle opening multiple files
set str to ""
repeat with i from 1 to length of input
set cur to item i of input
set str to str & " " & quote & POSIX path of cur & quote
end repeat
tell application "iTerm"
create window with profile "fast" -- use a profile with a lighter shell
@SilverEzhik
SilverEzhik / Discourse Enhancer.js
Last active Feb 12, 2019
A strange game. The only winning move is not to play.
View Discourse Enhancer.js
// ==UserScript==
// @name Discourse Enhancer
// @description A strange game. The only winning move is not to play.
// @version 1
// @run-at document-start
// @grant none
// @include *://*reddit.com/r/all/
// @include *://news.ycombinator.com/item*
@SilverEzhik
SilverEzhik / no.js
Last active Feb 20, 2019
write-only twitter
View no.js
// ==UserScript==
// @name No
// @include *twitter.com/*
// @run-at document-start
// ==/UserScript==
function no() {
var x = window.location;
if (x == "https://twitter.com/home" || x == "https://twitter.com/") {
x.replace("https://twitter.com/dril/status/922321981");
@SilverEzhik
SilverEzhik / Tree Style Tab.css
Created Dec 27, 2018
Fancy Side Tabs in Firefox
View Tree Style Tab.css
/* sync animation transitions */
.tab, .favicon, .twisty, .contextual-identity-marker, .newtab-button-box, .label {
transition: all 500ms ease-in-out 400ms, background-color 200ms ease-in-out !important;
}
html:hover .tab, html:hover .favicon, html:hover .twisty, html:hover .newtab-button-box, html:hover .label {
transition: all 400ms ease-in-out, background-color 200ms ease-in-out !important;
}
html:not(:hover) .tab {
margin-left: 0 !important;
@SilverEzhik
SilverEzhik / Twitter Lite instant block.js
Last active Nov 25, 2018
Block people on the lite version of the hell website with one less click
View Twitter Lite instant block.js
// ==UserScript==
// @name Twitter Lite instant block
// @description Block people on the hell website with one less click
// @include https://mobile.twitter.com/*
// @version 1
// @grant none
// @run-at document-idle
// ==/UserScript==
// using mozilla sample code
@SilverEzhik
SilverEzhik / Disable YouTube Autoplay.js
Last active Apr 21, 2019
YouTube is annoying in persistently switching autoplay back on, probably due to my cookie shennanigans, this fixes that.
View Disable YouTube Autoplay.js
// ==UserScript==
// @name Disable YouTube Autoplay
// @version 1
// @grant none
// @include https://*youtube.com/*
// @run-at document-idle
// ==/UserScript==
function fix() {
var a = document.getElementById("toggle");
You can’t perform that action at this time.