Change the variables COLORONE
and COLORTWO
and run to get your skin in output.png
This file contains 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
const USERNAME = "holyshitlois" | |
const COUNT_SELFQT_AS_QT = false | |
const DATE_CHANGES_AT_HR = 5 // 5 am | |
const tweets = require("./tweets.json") | |
/* | |
let replies = tweets.filter(tweet => | |
tweet.tweet.full_text.startsWith("@")) | |
let retweets = tweets.filter(tweet => | |
tweet.tweet.full_text.startsWith("RT")) |
This file contains 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
// day 1 part 1 | |
document.body.innerText.trim().split("\n").map(e=>Number(/^\D*(\d)/.exec(e)[1]+/(\d)\D*$/.exec(e)[1])).reduce((a,b)=>a+b) | |
// day 1 part 2 | |
document.body.innerText.trim().split("\n").map(e=>e.replace(/one|two|three|four|five|six|seven|eight|nine/g,d=>[0,"one","two","three","four","five","six","seven","eight","nine"].indexOf(d))).map(e=>Number(/^\D*(\d)/.exec(e)[1]+/(\d)\D*$/.exec(e)[1])).reduce((a,b)=>a+b) | |
// you could golf this more --- something like ...replace(new RegExp((a=[...]).join`|`,"g"),d=>a.indexOf(d))... | |
// day 2 part 1 | |
document.body.innerText.trim().split("\n").filter(g=>g.split(";").map(d=>(Number((/(\d+) b/.exec(d)||[0,0])[1])<=14)&&(Number((/(\d+) g/.exec(d)||[0,0])[1])<=13)&&(Number((/(\d+) r/.exec(d)||[0,0])[1])<=12)).reduce((a,b)=>a&&b)).map(g=>Number(g.match(/\d+/)[0])).reduce((a,b)=>a+b) | |
// day 2 part 2 | |
document.body.innerText.trim().split("\n").map(g=>g.split(";").map(d=>[Number((/(\d+) r/.exec(d)||[0,0])[1]),Number((/(\d+) g/.exec(d)||[0,0])[1]),Number((/(\d+) b/.exec(d)| |
This file contains 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 | |
BUCKET="vityavv-imagebin" | |
target=$(xclip -sel clip -o -t TARGETS | tail -1) | |
mime="$target" | |
[[ "$mime" == *"/"* ]] || mime="text/plain" | |
filename=$(yad --entry --title "S3 Uploader" --center --text "S3 Uploader\nClipboard type is $target" --text-align=center --entry-label="Filename:" 2>/dev/null || echo "STOP THIS") | |
[ "$filename" == "STOP THIS" ] && exit 1 |
This file contains 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
Array.from(document.querySelectorAll("div.things.clearfix .text-text .text .text")).map(e=>e.textContent).reduce((a,b)=>(a[a.length-1].length<2?a[a.length-1].push(b):a.push([b]),a),[[]]).map(e=>e.join(" ")).join("\n") |
This file contains 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
# Made by Victor Veytsman | |
# Usage: have a copypastas.txt file with your copypastas. | |
# Separate your copypastas with three equal signs | |
# Separate the name of the copypasta and the text with three semicolons | |
# Make this file executable and bind it to some keybinding | |
getList() { | |
grep -o '^.*;;;' copypastas.txt | sed 's/...$//g' | |
} |
This is a light theme for advent of code. style.css contains the style. bookmarklet.html can be visited with rawgit (that's the direct link to bookmarklet.html) to find a bookmarklet that can be dragged to your bookmarks bar and then pressed to make the AOC webpage light.
This file contains 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
package main | |
import ( | |
"math/rand" | |
"image/draw" | |
"image/png" | |
"image/color" | |
"strconv" | |
"os" | |
"time" |
This file contains 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
" Get the defaults that most users want. | |
source $VIMRUNTIME/defaults.vim | |
" Set colors be good | |
set termguicolors | |
colorscheme gruvbox | |
set background=dark | |
set cursorline | |
" Set search to highdark incomplete, case insensitive, highlight | |
set hls is ic | |
set number relativenumber |
This file contains 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
// This is my list of solutions to the Advent of Code challanges | |
// They are written in JavaScript, with the goal of getting the | |
// size of them to be as small as possible. | |
// Each one assumes that the variable y is an array of the body's | |
// contents. You can get that by doing the following in the | |
// browser console of the input: | |
y=document.body.innerText.split("\n") | |
// The documents may have a trailing newline, but you can do this | |
// to solve that | |
y=y.slice(0,y.length-1) |
NewerOlder