This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.
Here's the unedited original, translated to Github Markdown glory:
using { /Verse.org/Random } | |
Array<public> := module: | |
# Makes an `array` with only unique elements | |
(Input:[]t where t:subtype(comparable)).Unique<public>()<transacts>:[]t = | |
var UniqueArray : []t = array{} | |
for (Value : Input): | |
if (UniqueArray.Find[Value] > -1) {} | |
else: |
<?php | |
namespace App\Http\Middleware; | |
use Closure; | |
use Illuminate\Support\Arr; | |
class RobotEntertainerMiddleware | |
{ | |
const prohibitedRoutes = [ |
function adb_connect { | |
# PORT used to connect. Default: 5555 | |
PORT=${1:-5555} | |
# IP address from current device connected | |
IP_ADDRESS=`adb shell ip route | awk '{print $9}'` | |
echo "ADB connect to $IP_ADDRESS on port $PORT" | |
# Change connection from usb to tcpip using $PORT |
// Warning: Keep in mind that this example has a lot of boilerplate, | |
// because I want to make sure it's as easy to grasp as possible. | |
// In a real application you would probably want to wrap the cooldown | |
// check in a higher order function that easily creates a command and | |
// checks the cooldowns for you. | |
// The cooldown manager example | |
var CooldownManager = { | |
cooldownTime: 30000, // 30 seconds | |
store: { |
This was taken from http://rxwiki.wikidot.com/101samples, because I wanted to be able to read it more comfortable with syntax highlighting.
Here's the unedited original, translated to Github Markdown glory:
Apple has released support for bootcamping Windows 10, but only on 2012 Macs and later. Despite not being supported. it is possible to install Windows 10 on earlier iMacs and it seems to run quite well.
IMPORTANT: Unplug all external and physical hard drives (where possible) that you won't be installing to to avoid accidentally erasing them. Also make note of which drives and partitions remain (e.g. System and Storage hard drives), and be super careful to not erase the wrong one.
RECOVERY: If you nuke your machine, restore your time machine backup. Instructions here.
# Backup | |
docker exec CONTAINER /usr/bin/mysqldump -u root --password=root DATABASE > backup.sql | |
# Restore | |
cat backup.sql | docker exec -i CONTAINER /usr/bin/mysql -u root --password=root DATABASE | |