This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// How to use: open Console (View -> Developer -> Developer Tools -> Console) | |
// and paste one of the following: | |
/** | |
* Agree with ~first~ reaction in active Slack channel, poll every 10 seconds. | |
**/ | |
function clickFirstReaction() { | |
$("div.c-reaction_bar > button:nth-child(1):not(.c-reaction--reacted)").click() | |
} | |
var timerID = setInterval(clickFirstReaction, 10000); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.commands.onCommand.addListener(function(command) { | |
if (command === "agree-first-reaction") { | |
chrome.tabs.executeScript({ | |
code: ` ... // code from clickFirstReaction.js | |
` | |
}) | |
} else if (command === "agree-every-reaction") { | |
chrome.tabs.executeScript({ | |
code: ` ... // code form clickEveryReaction.js | |
` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
chrome.commands.onCommand.addListener(function(command) { | |
if (command === "agree-first-reaction") { | |
chrome.tabs.executeScript({ | |
code: ` | |
function clickFirstReaction() { | |
const query = "div.c-reaction_bar > button:nth-child(1):not(.c-reaction--reacted)"; | |
const reactionsToClick = document.querySelectorAll(query); | |
const beforeCount = reactionsToClick.length; | |
if (reactionsToClick.length) { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
c = get_config() | |
c.NotebookApp.ip = '0.0.0.0' | |
c.NotebookApp.open_browser = False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Configure remote instance for jupyter notebook | |
# Justin Shenk - June 2019 | |
# Create jupyter config, ip = 0.0.0.0 | |
wget https://gist.githubusercontent.com/justinshenk/6c9ea44e46b481e49c51efd48569a0a2/raw/45b7f8b1443978b49a1b82ea86b6d13805988a08/jupyter_notebook_config.py -P ~/.jupyter |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
# Installs NixOS on a Hetzner server, wiping the server. | |
# | |
# This is for a specific server configuration; adjust where needed. | |
# | |
# Prerequisites: | |
# * Update the script to adjust SSH pubkeys, hostname, NixOS version etc. | |
# | |
# Usage: |
OlderNewer