- Install Deno
- Run
deno run https://gist.githubusercontent.com/5t111111/698c87f8ee518f4db737bd00502695f1/raw/get-music-key-from-notes.ts C E F
The above will output:
#!/usr/bin/env bash | |
set -euo pipefail | |
#=============================================================================== | |
# rds-setsuzoku-chan (RDS SETSUZOKU CHAN) | |
# | |
# <README> | |
# https://gist.github.com/5t111111/5e864858250c555da9e4232242af1591#file-rds-setsuzoku-chan-md | |
#=============================================================================== |
/** | |
* Simple QRCode generator for Deno Deploy | |
*/ | |
import { qrcode } from "https://deno.land/x/qrcode/mod.ts"; | |
addEventListener("fetch", async (event) => { | |
const url = new URL(event.request.url); | |
const params = new URLSearchParams(url.search); | |
const text = params.get("text"); |
interface UploadPayload { | |
public_id: string; | |
version: number; | |
width: number; | |
height: number; | |
format: string; | |
resource_type: string; | |
created_at: string; | |
tags: string[]; | |
pages: number; |
import Vapor | |
public final class MyMiddleware: Middleware { | |
public init() { | |
} | |
public func respond(to req: Request, chainingTo next: Responder) throws -> Future<Response> { | |
return try next.respond(to: req).map { res in | |
if req.http.headers.contains(name: "X-NYA-N") { | |
res.http.headers.add(name: "X-NYA-N", value: "RESPONSE") |
... | |
exports.onCreateNode = ({ node, getNode, boundActionCreators }) => { | |
const { createNodeField } = boundActionCreators; | |
if (node.internal.type === 'MarkdownRemark') { | |
// Create slug with post date directory structure | |
const createSlug = (postDate, filePath) => { | |
const year = postDate.getFullYear(); | |
const month = `0${postDate.getMonth() + 1}`.slice(-2); // month with zero padding |
... | |
exports.onCreateNode = ({ node, getNode, boundActionCreators }) => { | |
const { createNodeField } = boundActionCreators; | |
if (node.internal.type === 'MarkdownRemark') { | |
// Create slug with post date directory structure | |
const createSlug = (postDate, filePath) => { | |
const year = postDate.getFullYear(); | |
const month = `0${postDate.getMonth() + 1}`.slice(-2); // month with zero padding |
Upgrading to Lion or Yosemite and WebStorm 9, I noticed key repeat was
turned off for the IdeaVim plugin h j k l keys.
defaults write -g ApplePressAndHoldEnabled -bool false
in a terminal will enable
key repeat for every app. This can alternatively be found in the accessibility
settings in OS X' preferences.
fc -lni 1 | ruby -rtime -r yaml -e 'puts STDIN.inject([]) { |a, l| a << { "cmd" => l[16..-1].strip, "when" => Time.parse(l[0..15]).to_i } }.to_yaml(options = {:line_width => -1})' > ~/.local/share/fish/histfile-from-zsh |