A very basic regex-based Markdown parser. Supports the
following elements (and can be extended via Slimdown::add_rule()
):
- Headers
- Links
- Bold
- Emphasis
- Deletions
var http = require('http'); | |
http.createServer(function (req, res) { | |
// set up some routes | |
switch(req.url) { | |
case '/': | |
console.log("[501] " + req.method + " to " + req.url); | |
res.writeHead(501, "Not implemented", {'Content-Type': 'text/html'}); | |
res.end('<html><head><title>501 - Not implemented</title></head><body><h1>Not implemented!</h1></body></html>'); | |
break; |
<?php | |
$fileName = $_FILES['afile']['name']; | |
$fileType = $_FILES['afile']['type']; | |
$fileContent = file_get_contents($_FILES['afile']['tmp_name']); | |
$dataUrl = 'data:' . $fileType . ';base64,' . base64_encode($fileContent); | |
$json = json_encode(array( | |
'name' => $fileName, | |
'type' => $fileType, | |
'dataUrl' => $dataUrl, |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE | |
Version 2, December 2004 | |
Copyright (C) 2011 Jed Schmidt <http://jed.is> | |
Everyone is permitted to copy and distribute verbatim or modified | |
copies of this license document, and changing it is allowed as long | |
as the name is changed. | |
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE |
[![tunnckoCore npm][author-npm-img]][author-npm-url] [![tunnckoCore twitter][author-twitter-img]][author-twitter-url] [![tunnckoCore github][author-github-img]][author-github-url]
Some investigation and tests on how to upgrade Mint machine.
Tests performed on Mint Cinnamon 14/15/16, on physical machine 14->15 and VirtualBox VMs for 14->15->16 and 14->16.
As usual you could break your machine, so please do backups before and cross fingers.
The objective of this post is to get you from absolutely nothing, to a fully functional nodejs environment. | |
Software used: Ubuntu 11.10, Nodejs v0.6.12, Nginx, MongoDB, Redis, and NPM modules. | |
1. Download and install the latest version of Ubuntu: http://www.ubuntu.com/download (don't select any extra items to install when prompted) | |
2. Once you are logged in and are at your Ubuntu command prompt, install the necessary software you will need: | |
a. sudo apt-get install openssh-server | |
b. sudo apt-get install libssl-dev | |
c. sudo apt-get install git | |
d. sudo apt-get install g++ | |
e. sudo apt-get install make |
I was recently asked for my opinion about Riot.js and what I thought about the MicroJS movement, as part of my residency for the wonderful Hacker Retreat initiative. Here's my thoughts.
Looking at the source, Riot.js is only a jQuery based event emitter you can attach to instances called observable with a trivial router that aliases to pushState. Everything else, you create, including the the CRUD abilities.
As someone who've recently tried to go Micro.js. I've actually given up on this rebuild from the ground up style approach. There is no support, no documentation, and no community to help you accomplish big prime time applications. Once you hit a wall, or try do to something that isn't included in the trivial amount of code there is, you're on your own, with no help besides "figure it out! that's what micro.js is about!".
This problem at it's
// 131bytes/short version | |
// jsbin demo http://jsbin.com/hakila/5/edit?console,js | |
function awf(n,t,l){!function c(){t.length>0?t.shift().apply(n||{},[].slice.call(arguments).concat(c)):0,0==t.length?l.call(n):0}()} |