Skip to content

Instantly share code, notes, and snippets.

View UnforeseenOcean's full-sized avatar
😠
Contact me directly for copyright issues.

Sean Canned Bean UnforeseenOcean

😠
Contact me directly for copyright issues.
  • Don't Bother LTD.
  • Somewhere Foundry, CA
View GitHub Profile
@UnforeseenOcean
UnforeseenOcean / feelslike.py
Created July 1, 2021 02:16
Apparent temperature calculation
# Apparent temperature calculation ("Feels Like" temperature)
# T: Temperature in Fahrenheit, H: Relative Humidity
# -42.58 + (2.049 * T) + (10.14 * H) + (-0.2248 * T * H) + (-0.006838 * T^2) + (-0.05482 * H^2) + (0.001228 * T^2 * H) + (0.0008528 * T * H^2) + (-0.00000199 * T^2 * H^2)
import math
T = float(input("Enter temperature in Celsius: "))
H = float(input("Enter Relative Humidity: "))
# Convert the temperature from C to F for calculation
@UnforeseenOcean
UnforeseenOcean / speech.txt
Created June 8, 2020 09:13
Format description for speech.json
Structure of the speech.json:
{
"lang":"cn",
"unit":["./etc/unit/percent.wav","./etc/unit/negative.wav","./etc/unit/degrees.wav","./etc/unit/celsius.wav","./etc/unit/fahrenheit.wav","./etc/unit/kelvin.wav"],
"week":["./etc/week/sunday.wav","./etc/week/monday.wav","./etc/week/tuesday.wav","./etc/week/wednesday.wav","./etc/week/thursday.wav","./etc/week/friday.wav","./etc/week/saturday.wav"],
"month": null,
"specialDay": null,
"hour": null,
"number":["./num/0.wav","./num/1.wav","./num/2.wav","./num/3.wav","./num/4.wav","./num/5.wav","./num/6.wav","./num/7.wav","./num/8.wav","./num/9.wav","./num/10.wav","./num/100.wav","./num/1000.wav"],
@UnforeseenOcean
UnforeseenOcean / mb64.txt
Created April 26, 2020 14:46
MEMORIES.COM by Hell Mood
sBPNEJVo9p8HuBwlskXNIbjNzPfnAOAw5AHowegJJA+TtwGKXzr/06pHR3XjsIXmQORg/sh12cMLk3R+YZClyOo3Q1jDRffFBwB1FLowA743AW5ubmnFgPbB6AoEFu5uz7gpEwDG9vaS9uop6jDUiOAkHMOSKegw4AzbBBPDiPAsZPbokvboAOaI8AHoJBjDiem78P8B+bgzA/fp0cpDd/SNRx/DjY4A+MHhAw+2xg++0onDD6/ZANcPr9Eo8CD4JPzWdQKwKsOx91KI8Cxk9umSAMj26YjwMOAEBKj4WuHpKekwyNQGBBTDgO54eBCJEN8A2jjZWP+LAAHoJIBIww==
@UnforeseenOcean
UnforeseenOcean / index.html
Created February 18, 2020 17:52
nth-everything css
<h1><p id="nthEverthing">nth-Everthing</p></h1>
<p id="letters">Hover a red letter. Cool, hu?</p>
<p id="pseudo">Pseudo elements are working</p>
<p id="click">Please click here</p>
<p id="flip">Every second letter is flipped</p>
<p id="crazy">Flip Hover Flip</p>
<p id="font">Zoom all the things!</p>
<p id="word">FirstWord some words Green some words LastWord</p>
<p id="firstLastWord">Hello from nth-everthing</p>
@UnforeseenOcean
UnforeseenOcean / index.html
Created January 24, 2020 17:29
Shitty Loading Bar
<h3 id="title">Click here to begin loading</h3>
<a href="#" onclick="toggleView()">Toggle View</a>
<canvas id="c" width="300" height="300"></canvas>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Swipe Keyboard</title>
<style>
body {
@UnforeseenOcean
UnforeseenOcean / name.js
Created September 8, 2019 14:59 — forked from tkon99/name.js
Random Name Generator for Javascript
/*
(c) by Thomas Konings
Random Name Generator for Javascript
*/
function capFirst(string) {
return string.charAt(0).toUpperCase() + string.slice(1);
}
function getRandomInt(min, max) {
@UnforeseenOcean
UnforeseenOcean / wget.md
Created September 1, 2019 06:39 — forked from protrolium/wget.md
wget commands

Download Only Certain File Types Using wget -r -A

You can use this under following situations:

  • Download all images from a website
  • Download all videos from a website
  • Download all PDF files from a website

$ wget -r -A.pdf http://url-to-webpage-with-pdfs/

@UnforeseenOcean
UnforeseenOcean / konamiCode.js
Created August 20, 2019 05:32 — forked from nestoralvaro/konamiCode.js
Snippet to detect Konami Code (and then do something)
/******************************************************************************
* This script detects the Konami code
* (Full Konami Code obtained from: http://en.wikipedia.org/wiki/Konami_Code)
* If the Konami code is detected the function called "startUpKonami" is invoked.
* You can do whatever you want on "startUpKonami". Right now this method just:
* - Detachs the Konami code detection (so no further detections can happen).
* - Invokes an external function.
*
* Note: In case the user presses keys like "shift", "caps lock", "Ctrl"...
* the code will have to be reentered from scratch
@UnforeseenOcean
UnforeseenOcean / Sigma-Phi.js
Created July 24, 2019 05:51
Cause gravitational collapse
var anim="@keyframes sigma{0%{transform:scale(1,1);opacity:0.95;}99.9%{transform:scale(0,0)rotate3d(1,1,1,180deg);}100%{opacity:0;}}",head=document.head||document.getElementsByTagName('head')[0],style=document.createElement('style');head.appendChild(style);var e=document.body.getElementsByTagName('*');style.type='text/css';if(style.styleSheet){style.styleSheet.cssText = anim;}else{style.appendChild(document.createTextNode(anim));}for(var i=0;i<e.length;i++){e[i].setAttribute("style","animation:sigma 10s 1 ease-out forwards;transform-origin:center center;display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;")};