A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()):
- Headers
- Links
- Bold
| from: http://www.meandmark.com/keycodes.html | |
| with some additions from people in the comments, thanks :) | |
| Virtual Keycodes for the Mac QWERTY Layout | |
| Keycodes are in hexadecimal. A blank entry means either there is no key assigned to that keycode or I was unable to find the assigned key. | |
| Keycode Key | |
| 0x00 A | |
| 0x01 S | |
| 0x02 D |
| The MIT License (MIT) | |
| Copyright (c) 2016 Stuart Powers | |
| Permission is hereby granted, free of charge, to any person obtaining a copy | |
| of this software and associated documentation files (the "Software"), to deal | |
| in the Software without restriction, including without limitation the rights | |
| to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | |
| copies of the Software, and to permit persons to whom the Software is | |
| furnished to do so, subject to the following conditions: |
| var crypto = require('crypto') | |
| , key = 'salt_from_the_user_document' | |
| , plaintext = 'password' | |
| , cipher = crypto.createCipher('aes-256-cbc', key) | |
| , decipher = crypto.createDecipher('aes-256-cbc', key); | |
| cipher.update(plaintext, 'utf8', 'base64'); | |
| var encryptedPassword = cipher.final('base64') | |
| decipher.update(encryptedPassword, 'base64', 'utf8'); |
A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()):
| // Create our server | |
| var server; | |
| server = http.createServer(function(req,res){ | |
| // Set CORS headers | |
| res.setHeader('Access-Control-Allow-Origin', '*'); | |
| res.setHeader('Access-Control-Request-Method', '*'); | |
| res.setHeader('Access-Control-Allow-Methods', 'OPTIONS, GET'); | |
| res.setHeader('Access-Control-Allow-Headers', '*'); | |
| if ( req.method === 'OPTIONS' ) { | |
| res.writeHead(200); |
| <?xml version="1.0" encoding="UTF-8"?> | |
| <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
| <plist version="1.0"> | |
| <dict> | |
| <key>Ansi 0 Color</key> | |
| <dict> | |
| <key>Blue Component</key> | |
| <real>0.16300885379314423</real> | |
| <key>Green Component</key> | |
| <real>0.16304571926593781</real> |
| var request = require('supertest'), | |
| should = require('should'), | |
| app = require('../server'); | |
| var Cookies; | |
| describe('Functional Test <Sessions>:', function () { | |
| it('should create user session for valid user', function (done) { | |
| request(app) | |
| .post('/v1/sessions') |
| #!/bin/bash | |
| function usage() { | |
| echo "usage: $0 <volume (0-100)> <say args...>" | |
| echo | |
| echo "Unmutes and sets the system volume to volume%, passing the remaining" | |
| echo "arguments to the OSX \`say' command, restoring volume / mute setting" | |
| echo "to previous values after the speech has completed." | |
| exit 1 | |
| } |
| #!/usr/bin/env node | |
| /** | |
| npm install cheerio request step | |
| chmod +x urlparser.js | |
| ./urlparser.js | |
| */ | |
| var cheerio = require('cheerio') | |
| , request = require('request') |