View YoRHa Android Boot Sequence
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
L O A D I N G - BOOTING SYSTEM... | |
Commencing System Check | |
Memory Unit: Green | |
Initializing Tactics Log | |
Loading Geographic Data | |
Vitals: Green | |
Remaining MP: 100% | |
Black Box Temperature: Normal | |
Black Box Internal Pressure: Normal |
View a-bookmarklet.txt
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
Create a new bookmark and use the below was the URL: | |
javascript:(function()%7Bs%3Ddocument.createElement('script')%3B%0As.setAttribute('type'%2C%20'module')%3B%0As.innerHTML%20%3D%20%60import%20%7BGLTFExporter%7D%20from%20'https%3A%2F%2Frawcdn.githack.com%2Fmrdoob%2Fthree.js%2Fcf04fca253477f40e04488229cfcaf0f280e448b%2Fexamples%2Fjsm%2Fexporters%2FGLTFExporter.js'%3B%0Aif%20(!window.scene)%20%7B%0A%20%20alert('No%20window.scene')%3B%0A%7D%20else%20%7B%0A%20%20const%20exporter%20%3D%20new%20GLTFExporter()%3B%0A%20%20exporter.parse(%20scene%2C%20function%20(%20gltf%20)%20%7B%0A%20%20%20%20const%20blob%20%3D%20new%20Blob(%20%5B%20gltf%20%5D%2C%20%7B%20type%3A%20'application%2Foctet-stream'%20%7D%20)%3B%0A%20%20%20%20const%20link%20%3D%20document.createElement(%20'a'%20)%3B%0A%20%20%20%20link.style.display%20%3D%20'none'%3B%0A%20%20%20%20document.body.appendChild(%20link%20)%3B%0A%20%20%20%20link.href%20%3D%20URL.createObjectURL(%20blob%20)%3B%0A%20%20%20%20link.download%20%3D%20'scene.glb'%3B%0A%20%20%20%20link |
View DomQuery.js
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 just the worst don't use it. | |
function $(...s) { | |
if (s.length === 0) return document.childNodes; | |
// Handle it being used as a template tag | |
const inString = (typeof s[0] === 'string' ? s[0] : String.raw(...s)).trim(); | |
if (inString[0].includes('<')) { | |
return document.createRange().createContextualFragment(inString); | |
} else { |
View Simple Sky Shader
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 skygeometry = new SphereGeometry( 25, 50, 50 , 0, 2 * Math.PI); | |
const skymaterial = new MeshBasicMaterial(); | |
skymaterial.side = BackSide; | |
skymaterial.onBeforeCompile = function (shader) { | |
shader.vertexShader = shader.vertexShader.replace('#include <common>', '#include <common>\n#define USE_UV'); | |
shader.fragmentShader = shader.fragmentShader.replace('#include <common>', '#include <common>\n#define USE_UV'); | |
shader.vertexShader = shader.vertexShader.replace('#include <uv_vertex>', ` | |
vUv = ( uvTransform * vec3( uv, 1 ) ).xy; | |
`) | |
shader.fragmentShader = shader.fragmentShader.replace('#include <map_fragment>', ` |
View code-server-update.sh
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 | |
DIR="$HOME/bin" | |
cd /tmp | |
curl -s https://api.github.com/repos/cdr/code-server/releases/latest \ | |
| grep "browser_download_url.\+linux-x86_64.tar.gz" \ | |
| cut -d : -f 2,3 \ | |
| tr -d \" \ |
View next_agenda.sh
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
Add this line to the crontab to cache the agenda every 10 minutes | |
*/10 * * * * OUT=$(/usr/bin/gcalcli --tsv --nostarted agenda "`date`") && echo "$OUT" > $HOME/.gcalcli-agenda-cache | |
This is part of my tmux config to include it: | |
tmux_conf_theme_status_left=' #($HOME/bin/next_agenda.sh) | #{prefix}#{pairing}#{synchronized}' | |
tmux_conf_theme_status_right='#{?battery_status, #{battery_status},}#{?battery_bar, #{battery_bar},}#{?battery_percentage, #{battery_percentage},} | #{username}#{root} | #{hostname} |' | |
set -g status-interval 10 |
View todo-repl
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 | |
tput smcup | |
# Turn user input off | |
stty -echo | |
display() { | |
BUFFER=$( | |
tput clear |
View HTMLElementPlus.js
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
'use strict'; | |
class HTMLElementPlus extends HTMLElement { | |
static defaultAttributeValue() { | |
/* the name of the attribute is parsed in as a parameter */ | |
return; | |
} | |
static parseAttributeValue(name, value) { |
View HTMLElementWithRefs
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
class HTMLElementWithRefs extends HTMLElement { | |
constructor () { | |
super(); | |
this.refs = new Proxy({}, { | |
get: this.__getFromShadowRoot.bind(this) | |
}); | |
} | |
__getFromShadowRoot (target, name) { |
View Finished polyfill.js
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
if (document.body.animate && typeof Animation === 'undefined') { | |
window.Animation = document.body.animate({}).constructor; | |
} | |
if (typeof Animation !== 'undefined' && Animation.prototype.finished === undefined) { | |
Object.defineProperty(Animation.prototype, 'finished', {get: function () { | |
if (this.__finishPromise) return this.__finishPromise; | |
if (this.playState === 'finished') { | |
this.__finishPromise = Promise.resolve(); | |
} else { |
NewerOlder