Skip to content

Instantly share code, notes, and snippets.

@VelizarHristov
VelizarHristov / thing.js
Created December 28, 2024 23:02
Greasemonkey script to hide the "Hot Network Questions" feature from StackExchange
// ==UserScript==
// @name Hide StackExchange Hot Network Questions
// @version 1
// @grant none
// @match https://stackoverflow.com/*
// @match https://serverfault.com/*
// @match https://askubuntu.com/*
// @match https://stackapps.com/*
// @match https://superuser.com/*
// @match https://*.stackexchange.com/*
@VelizarHristov
VelizarHristov / thing.js
Last active December 29, 2024 01:29
Greasemonkey script to collapse Youtube suggestions behind a button that lets you toggle them
// ==UserScript==
// @name Collapse Youtube suggestions
// @version 1
// @grant none
// @match https://www.youtube.com/*
// ==/UserScript==
let attemptCounter = 0;
// For some reason we need to initially hide the element twice before it stops reappearing
let hideCounter = 0;
resource "aws_iam_role" "main_server_role" {
name = "main_server_role_${var.environment}"
assume_role_policy = jsonencode({
Version = "2012-10-17"
Statement = [
{
Action = "sts:AssumeRole"
Effect = "Allow"
Sid = ""
Principal = {
---
plugin: aws_ec2
regions:
- eu-west-2
filters:
tag:Name: Backend-"{{ environment }}"
# Be sure to restart your server when you modify this file.
#
# This file contains migration options to ease your Rails 5.0 upgrade.
#
# Once upgraded flip defaults one by one to migrate to the new default.
#
# Read the Rails 5.0 release notes for more info on each option.
###
### OLD DEFAULTS ###
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<IsPackable>false</IsPackable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Microsoft.NET.Test.Sdk" Version="16.5.0" />
using System;
using Xunit;
namespace LaserEdgeTest
{
public class UnitTest1
{
[Fact]
public void Test1()
{
function fish_prompt --description 'Write out the prompt'
#Save the return status of the previous command
set stat $status
# Just calculate these once, to save a few cycles when displaying the prompt
if not set -q __fish_prompt_hostname
set -g __fish_prompt_hostname (hostname|cut -d . -f 1)
end
if not set -q __fish_prompt_normal
@VelizarHristov
VelizarHristov / okc.js
Last active January 24, 2019 00:02
Mark OKCupid questions as hidden
/**
Instructions:
1. Visit https://www.okcupid.com/questions
2. Open your browser's console
3. Paste the three lines below into the console
const jQuery = document.createElement('script');
jQuery.setAttribute('src','https://code.jquery.com/jquery-3.3.1.min.js');
document.head.appendChild(jQuery);
function animationIsInProgress () {
const docElement = document.body || document.documentElement
if (typeof docElement.style['transition'] === 'string') {
return true
}
const vendorSpecific = ['Moz', 'webkit', 'Webkit', 'Khtml', 'O', 'ms']
for (let i = 0; i < vendorSpecific.length; i++) {
if (typeof docElement.style[vendorSpecific[i] + 'Transition'] === 'string') {
return true