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
<!-- most modern browsers --> | |
<p><br></p> | |
<!-- ie9 --> | |
<p></p> | |
<!-- ie7-8 --> | |
<script> | |
document.body.appendChild(document.createElement('p')) | |
</script> |
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
# Asynchronous DSL for CoffeeScript | |
serial = (f) -> | |
next = -> arr.shift().apply(null, arguments) if arr.length | |
arr = (v for k, v of f(next)) | |
next() | |
null | |
parallel = (f, after = ->) -> | |
res = {}; arrc = 0 |
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
var express = require('express'); | |
var app = module.exports = express.createServer(); | |
// Configuration | |
app.configure(function(){ | |
app.set('view engine', 'mustache'); | |
app.set('views', __dirname + '/views'); | |
app.register(".mustache", require('stache')); |
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
# MonoPrice Cadet script for uploading .gcode files | |
# and listing the contents of the SD card | |
# | |
# Usage: python mpcadet.py 192.168.1.X | |
# | |
# Uploads the local CADET.gcode file in the same directory | |
# as your script to the device and then kicks off a build. | |
# | |
# A limited number of GCODE commands seem possible: | |
# https://marlinfw.org/docs/gcode/M023.html |
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
// Type output by wasm-bindgen to the .d.ts bindings. No JS code is generated, just type definitions | |
export type ControllerCommand = | |
| { "Keypress": { key_code: number, meta_key: boolean, shift_key: boolean, alt_key: boolean, } } | |
| { "Button": { button: number, } } | |
| { "Character": { char_code: number, } } | |
| { "InsertText": { text: string, } } | |
| { "RenameGroup": { tag: string, curspan: any, } } | |
| { "Cursor": { focus: any, anchor: any, } } | |
| { "RandomTarget": { position: number, } } |
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
processor 6502 | |
include "vcs.h" | |
include "macro.h" | |
org $f000 | |
; Sprites are a tricky beast on the 2600. | |
; You only have two of them. | |
; They are 8 bits wide and 1 bit high. | |
; There's no way to position the X or Y coordinate directly. |
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
#![allow(unused)] | |
extern crate ron; | |
extern crate serde; | |
#[macro_use] extern crate serde_derive; | |
extern crate serde_with; | |
use serde::{Deserialize, Serialize, Serializer, Deserializer}; | |
#[derive(Serialize, Deserialize)] |
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
#!/usr/bin/env run-cargo-script | |
//! ```cargo | |
//! [dependencies] | |
//! juniper = "*" | |
//! rouille = "*" | |
//! serde_json = "*" | |
//! serde = "*" | |
//! ``` | |
#[macro_use] extern crate rouille; |
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
make an itunes backup | |
Go to `~/Library/Application Support/MobileSync/Backup` | |
Find the backup id folder | |
Look up `Manifest.db` in that dir to identify Files row with `relativePath=Library/SpringBoard/IconState.plist` and its `fileID` | |
in the `<backup_id>/<first two digits>/<that hash>` file, run |
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
// Declare your union variants | |
// Easy to name variant contructors + define tags in one place | |
function Age(age: number) { | |
return { tag: 'Age' as 'Age', age } | |
} | |
function Name(name: string) { | |
return { tag: 'Name' as 'Name', name } | |
} |
NewerOlder