Quokka #2 (node: v8.11.3)
Call the provided function, fn
, with up to n
arguments, using Array.prototype.slice(0,n)
and the spread operator (...
).
const ary = (fn, n) => (...args) => fn(...args.slice(0, n));
true
if the provided predicate function returns true
for all elements in a collection, false
otherwise.Use Array.prototype.every()
to test if all elements in the collection return true
based on fn
.
Omit the second argument, fn
, to use Boolean
as a default.
const all = (arr, fn = Boolean) => arr.every(fn);
#!/usr/bin/env bash | |
# TODO INSTALL MAGET APP | |
#https://gist.github.com/jexchan/5754956 | |
#https://github.com/mathiasbynens/dotfiles/blob/master/.macos | |
#https://jonlabelle.com/snippets/view/shell/mac-os-x-defaults | |
# ~/.macos — https://mths.be/macos | |
# Close any open System Preferences panes, to prevent them from overriding | |
# settings we’re about to change | |
osascript -e 'tell application "System Preferences" to quit' |
##To fix the stupid but that yarn has that if you have a file called /package.json in the root of your system yarn will fail!
###all you need to do is
sudo rm /package.json
const pdrone = require('pdrone'); | |
const drone = pdrone({id: 'mambo', debug: false}); | |
/** Helper function */ | |
function sleep(ms) { | |
return new Promise(a => setTimeout(a, ms)); | |
} | |
// DIRECTIONS | |
// - up / down / left / right /forward /back |
const camelcase = require('camelcase'); | |
const { DroneConnection, CommandParser } = require('pdrone-low-level'); | |
const EventEmitter = require('events'); | |
const formatArguments = args => | |
args.reduce( | |
(acc, cur) => ({ | |
...acc, | |
[cur._name]: cur._value, | |
}), |
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Copyright (C) 2017 Parrot SA | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions | |
are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright |
<?xml version="1.0" encoding="UTF-8"?> | |
<!-- | |
Copyright (C) 2017 Parrot SA | |
Redistribution and use in source and binary forms, with or without | |
modification, are permitted provided that the following conditions | |
are met: | |
* Redistributions of source code must retain the above copyright | |
notice, this list of conditions and the following disclaimer. | |
* Redistributions in binary form must reproduce the above copyright |
const pdrone = require('pdrone'); | |
const drone = pdrone({id: 'mambo', debug: false}); | |
/** Helper function */ | |
function sleep(ms) { | |
return new Promise(a => setTimeout(a, ms)); | |
} | |
drone.on('connected', async () => { | |
// drone.flatTrim(); // use flatTrim() everytime you want the drone to calm down |
Year of manufacture: 2017 Version: 10.12.6 (16G29) Developer: Apple Inc. Developer's site: © Apple Inc. Platform: Intel with support for SSE4.2 (it is possible to run on the CPU with SSE4.1), for AMD there is an instruction for FX-series Language: multilanguage Tablet: VMware Unlocker for all versions of VMware ---- version of VMware 10 and below or version of VMware 11 and aboveSystem requirements: