- Install httpie
- Install node.js
- Paste those files into some folder
- Install CoffeeScript into node with
npm install coffee
- Run the server
coffee server.coffee
Use it
- (void) doIt { | |
// Define the command name and the arguments array (the nil at the end is needed) | |
NSArray *arguments = [NSArray arrayWithObjects:@"--some-argument", @"--another", nil]; | |
NSString *command = @"do-something-shell"; | |
// Setup the NSTask for the command execution | |
NSTask *task = [[NSTask alloc] init]; | |
task.launchPath = command; | |
task.arguments = arguments; |
npm install coffee
coffee server.coffee
Use it
Based on the example file from the announcement blog post http://sketchplugins.com/d/87-new-file-format-in-sketch-43
type UUID = string // with UUID v4 format
type SketchPositionString = string // '{0.5, 0.67135115527602085}'
type SketchNestedPositionString = string // '{{0, 0}, {75.5, 15}}'
<script src="./script.js"></script> | |
<!-- <script src="./test.js" type="module"></script> --> | |
<style> body { margin: 0 } </style> | |
<canvas /> |
// --- WASM COMMANDS | |
const WASM_BINARY_MAGIC = [0x00, 0x61, 0x73, 0x6d] | |
const WASM_BINARY_VERSION = [0x01, 0x00, 0x00, 0x00] | |
const HEADER = WASM_BINARY_MAGIC.concat(WASM_BINARY_VERSION) | |
const I32 = 0x7F | |
const I32_ADD = 0x6a | |
const SECTION_CODE_TYPE = 0x01 | |
const SECTION_CODE_FUNCTION = 0x03 | |
const SECTION_CODE_EXPORT = 0x07 |
This is the hack approach to adding environment variables to the nginx configuration files. As with most Google results for this search, the reason is Docker.
I intended to deploy two Docker containers.
(function (window) { | |
'use strict' | |
var Socket = function (url) { | |
this.url = url || 'ws://localhost:10001' | |
this.connect() | |
} | |
Socket.prototype.connect = function () { |
const R = require('ramda') | |
const args = [2, [1, 2, 3]] | |
const output = [[1, 2], [3]] | |
const whichRamdaFunctionShouldIUse = (args, output) => { | |
return Object.keys(R).filter((key) => { | |
if (typeof R[key] !== 'function') { | |
return false | |
} |
data Alignment | |
= LeftAligned | |
| CenterAligned | |
| RightAligned | |
data FontLevel | |
= DisplayTitle | |
| BodyText | |
data Variant |
riemannZeta : (s : Double) -> IO Double | |
riemannZeta s = riemannZetaStep s 1.0 0.0 | |
where riemannZetaStep : (s : Double) -> (n : Double) -> (p : Double) -> IO Double | |
riemannZetaStep s n p = | |
do let currentPower = pow n s | |
let currentFraction = 1.0 / currentPower | |
let currentValue = currentFraction + p | |
putStrLn ("s " ++ show s) | |
putStrLn ("n " ++ show n) | |
putStrLn ("power " ++ show currentPower) |