A Pen by Evan Goode on CodePen.
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
function or(array) { | |
var probability = 0 | |
var combos = [] | |
for(var i = 1; i < array.length + 1; i++) { | |
var combinations = getCombinations(array, i) | |
for(var j = 0; j < combinations.length; j++) { | |
combos.push(combinations[j]) | |
} | |
} |
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
#!/bin/bash | |
woeid="2390183" | |
weather=`curl --silent "http://xml.weather.yahoo.com/forecastrss?w=${woeid}&u=f" | xmllint --xpath "string(//*[local-name()='condition']//@code)" -` | |
# codes from https://developer.yahoo.com/weather/documentation.html#codes | |
case "$weather" in | |
0) # tornado | |
emoji="🌪" # cloud with tornado | |
;; |
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
var script = document.createElement("script") | |
script.id = "goodbye" | |
script.innerHTML = " \ | |
window.onbeforeunload = null \ | |
" | |
document.documentElement.appendChild(script) |
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 python3 | |
import json | |
import math | |
import random | |
import yaml | |
import dominate | |
from dominate.tags import * | |
def load_yaml (filename): |
A Pen by Evan Goode on CodePen.
A Pen by Evan Goode on CodePen.
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
<input placeholder="X #1" id="a-y"> | |
<input placeholder="Z #1" id="a-x"> | |
<input placeholder="˚ #1" id="a-angle"> | |
<br><br> | |
<input placeholder="X #2" id="b-y"> | |
<input placeholder="Z #2" id="b-x"> | |
<input placeholder="˚ #2" id="b-angle"> | |
<br><br> | |
<button id="go">go</button> | |
<pre id="result"></pre> |
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 arrows = { | |
right: 'https://upload.wikimedia.org/wikipedia/commons/1/12/Right_arrow.svg', | |
left: 'https://upload.wikimedia.org/wikipedia/commons/1/18/Left_arrow.svg' | |
} | |
let timeout; | |
document.addEventListener('click', () => { | |
document.body.style.backgroundImage = `url(${Math.round(Math.random()) ? arrows.left : arrows.right})`; | |
clearTimeout(timeout); | |
timeout = setTimeout(() => { |
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
DBG<1> lib/cache_mngt.c:271 nl_cache_mngt_register: Registered cache operations genl/family | |
polybar|info: Parsing config file: /home/evan/.config/polybar/config | |
polybar|trace: config_parser: Parsing /home/evan/.config/polybar/config | |
polybar|info: Enabling xresource manager | |
polybar|info: Environment var reference ${MONITOR} found (value=eDP-1) | |
polybar|info: Loaded monitor eDP-1 (2880x1800+0+0) | |
polybar|info: Found matching X resource "color0" (value=#0a0a0f) | |
polybar|info: Found matching X resource "color7" (value=#d6cdd8) | |
polybar|info: Bar geometry: 2880x60+0+0; Borders: 0,0,0,0 | |
polybar|trace: bar: Attach X event sink |
OlderNewer