Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/env python3
def printen(strr):
print(strr, end='')
adventure = [
'''welcome to the <b>choost adventure engine!</b>
would you like to play a game?''',
{
@wickedst
wickedst / next.config.js
Last active May 27, 2022 16:47
Now V2 next.js config for postlight/headless-wp-starter
// just adds target: "serverless"
const path = require('path');
const glob = require('glob');
module.exports = {
webpack: config => {
config.module.rules.push(
{
test: /\.(css|scss)/,
@mrmartineau
mrmartineau / stimulus.md
Last active April 19, 2024 09:41
Stimulus cheatsheet
@pmn4
pmn4 / service_response_object.rb
Last active August 29, 2015 14:13
Ruby Classes as Hash Wrappers (for faster serialization)
#!/usr/bin/env ruby
# More often than not at @RTR_tech, our ruby layer is a pass-through from our
# services to our client application. In those cases, it doesn't make much
# sense to parse the JSON string.
#
# Other times, however, we want to work with the objects that come back, so
# like good ruby developers, we create classes which reflect the data we
# expect, but as an intermittant step, we convert the JSON to a Hash, which
# we convert to an object.
@nasser
nasser / islands.geojson
Last active August 29, 2015 14:05
Small Islands Of New York
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
#!/usr/bin/env ruby -wKU
# Comments added 6 March 2014.
# Implementation of the MetaWeblog API for my personal Ruby static blog generator.
# This is not even nearly idiomatic Ruby. There are all kinds of issues.
# (What's with the method interiors all being mushed-up together?)
# But -- it's also worked flawlessly for five years without my having to edit it.
# It won't work for anyone else as-is — but if it helps anyone
# to do a MetaWeblog API implementation, then cool.
@mwunsch
mwunsch / replicate.js
Created February 5, 2014 18:39
Clone DOM node w/ relevant styles
/**
*
* HTMLElement.replicate()
*
* Here's an extension to the DOM's [HTMLElement interface][1] that completely
* replicates an element. Unlike `Node.cloneNode`, this method also copies over
* relevant styles. This allows you to clone nodes completely detached from the
* source document, but with enough information to render their independent
* representation.
*
@stephencelis
stephencelis / emoji.txt
Created April 3, 2012 18:38
iOS 6 / Mountain Lion Emoji
2139 ℹ INFORMATION SOURCE
23EB ⏫ BLACK UP-POINTING DOUBLE TRIANGLE
23EC ⏬ BLACK DOWN-POINTING DOUBLE TRIANGLE
23F0 ⏰ ALARM CLOCK
23F3 ⏳ HOURGLASS WITH FLOWING SAND
26C5 ⛅ SUN BEHIND CLOUD
26D4 ⛔ NO ENTRY
2705 ✅ WHITE HEAVY CHECK MARK
2753 ❓ BLACK QUESTION MARK ORNAMENT
2757 ❗ HEAVY EXCLAMATION MARK SYMBOL