- Install
babel-cli
and save it to your developer dependencies
npm i --save-dev babel-cli
- Install a preset of your choice. Presets indicate which version of EcmaScript to use. The
env
preset is the most recent version.
let content = node.content; | |
if (Array.isArray(node.content)) { | |
// Combine elements of type text | |
content = node.content.reduce((_content, item) => { | |
const lastNodeIndex = _content.length - 1; | |
const lastNode = _content[_content.length - 1]; | |
if (_content.length > 0 && lastNode.type === 'text' && item.type === 'text') { | |
_content[lastNodeIndex].content = lastNode.content + item.content; | |
} else { |
/* Onlu needed for printf() */ | |
#include <stdio.h> | |
/* Boolean types - comment if not needed */ | |
typedef int bool; | |
#define true 1 | |
#define false 0 | |
/* !Boolean types */ | |
/* There are also built-in functions for these */ |
// node imports | |
var sys = require('sys'); | |
var base58 = require('bs58'); | |
var SHA3 = require('sha3'); | |
// validation function | |
function validateAddress(address) { | |
// network/version byte | |
var version = address.substring(0, 1); | |
if (version != 'm') return false; |
#!/usr/bin/python | |
import sys | |
import getopt | |
import urllib2 | |
from optparse import OptionParser | |
def main(): | |
# variables | |
btcaddr = "" |
// Tool for working out cryptocurrency distribution rates | |
// Luke Mitchell, 2014 | |
#include "stdlib.h" | |
#include "stdio.h" | |
int main (int argc, char** argv) { | |
printf ("Cryptodistribution tool\n"); | |
printf ("=======================\n\n"); |
/* @flow */ | |
import React from 'react'; | |
import Svg, { | |
Circle, | |
Ellipse, | |
G, | |
LinearGradient, | |
RadialGradient, |
// Dense Binary Text Encoding | |
// Encode each of the 26 letter as 1 to 26, in binary. | |
// Encode spaces as 0. | |
const ASCII_A = 65; | |
const ENCODED_SPACE = 0; | |
function dbte(str) { | |
const digits = str.toUpperCase().split(''); | |
const encoding = digits.reduce((obj, d, i) => { |
#! /bin/sh | |
ssid1="THEUNIVERSE" | |
pass1="yourpass" | |
ssid2="SPACE" | |
pass2="yourotherpass" | |
curr=`/System/Library/PrivateFrameworks/Apple80211.framework/Versions/Current/Resources/airport -I | awk '/ SSID/ {print substr($0, index($0, $2))}'` | |
echo Currently connected to $curr | |
echo Power cycling... |