Skip to content

Instantly share code, notes, and snippets.

Michael Verdi Verdi

Block or report user

Report or block Verdi

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
Verdi / gist:c04f379322fbcd789767e57f92af957f
Created Feb 25, 2019
Bandersnatch-like timer for Twine
View gist:c04f379322fbcd789767e57f92af957f
[[DEFAULT CHOICE PASSAGE NAME]] <!-- This is the passage you will go to if no action is taken -->
<!-- Timer code below -->
{(live: XX+8s)[(replace: "PASSAGE NAME")[**~~PASSAGE NAME~~**]]}<!-- This will cross out a link to a passage. The time (live: XX+8s) is meant to make it happen 8 seconds after the 10 second countdown starts. -->
{(live: XXs)[(stop:) <!-- "XXs" is the amount of seconds you want to wait before the countdown starts -->
(set: $counter to 10)
Time left: |amount>[$counter]
(live: 1s)[
(set: $counter to it - 1)
(if: $counter is 0)[(go-to: "DEFAULT CHOICE PASSAGE NAME")]
View gist:6ed68f3d4b891ec69402dffc9dbedac8
/* My Harelowe Game Styles */
@import url(',600');
@import url(',700');
html, tw-story {
background-color: #F2F2F2;
color: #242424;
tw-sidebar {
Verdi / .htaccess
Created Nov 11, 2018
.htaccess to apply new serviceworker right away
View .htaccess
<IfModule mod_expires.c>
<FilesMatch "serviceworker.js">
ExpiresDefault "access plus 0 seconds"
Verdi / extra_meta_tags_for_twine.txt
Last active Jun 1, 2019
Meta tags to add to twine game
View extra_meta_tags_for_twine.txt
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<link rel="manifest" href="/manifest.json" />
<link rel="icon" href="icon-256.png" sizes="256x256" />
<link rel="icon" href="icon-32.png" sizes="32x32" />
<link rel="icon" href="icon-192.png" sizes="192x192" />
<link rel="apple-touch-icon-precomposed" href="icon-180.png" />
<meta name="msapplication-TileImage" content="icon-270.png" />
Verdi / manifest.json
Created Nov 11, 2018
Web manifest for twine game
View manifest.json
"lang": "en",
"name": "My Game",
"short_name": "My Game",
"description": "My super awesome twine game",
"start_url": "/index.html",
"background_color": "#000000",
"theme_color": "#202020",
"display": "standalone",
"icons": [{
Verdi / register_serviceworker.txt
Last active Jun 1, 2019
Register Serviceworker
View register_serviceworker.txt
if (navigator.serviceWorker) {
Verdi / serviceworker.js
Last active Jun 1, 2019
Serviceworker for twine game
View serviceworker.js
const version = 'V0.03';
const staticCacheName = version + 'staticfiles';
addEventListener('install', installEvent => {
.then(staticCache =>{
// These files don't block installation
Verdi /
Last active Feb 11, 2019
This is the setup I use in Framer Studio for creating desktop software (Browsers) mockups.
########## Include for desktop projects ##########
# Tell computers with touch screens to use the mouse
if Utils.isDesktop() or not Utils.isTouch()
preventer = () -> alert "Please use your mouse and not the touch screen."
preventer2 = (event) -> if event.pointerType is "touch" then preventer() # Edge-only
window.addEventListener("touchstart", preventer, false)
window.addEventListener("pointerdown", preventer2, false)
# Ensures that the alert also fires for Edge
You can’t perform that action at this time.