Homebrew Formula patching old ImageMagick release 6.9.7-3
$ brew install https://gist.githubusercontent.com/afaur/15fbb18b28e2140ec3fda8b098262e55/raw/b733366d08da64f87bc889eebf173f4e50e394bc/imagemagick.rb| // Console.log alias | |
| const l = (...args) => console.log(...args) | |
| // Reject promise with custom error alias | |
| const err = (rej, type) => rej(new Error(type)) | |
| // SetTimeout alias | |
| const STO = (fn, ms) => setTimeout(fn, ms) | |
| // new Promise alias |
| // Get stdout off process as outPipe | |
| const { stdout: outPipe } = process | |
| // Import log and trace off of console | |
| const { log, trace } = console | |
| // Make a logRaw function | |
| const logRaw = (...args) => outPipe.write(...args) | |
| // Easy log fn for node |
| <?php | |
| /** | |
| * AOP Trait | |
| * Used to created aop for your class. | |
| */ | |
| trait AOP { | |
| public $filters = []; | |
| public function applyFilter($NF) { | |
| list($fnName, $fn) = $NF; | |
| ($this->unlessFilter($fnName)) && $this->initFilter($fnName); |
| // Create a `Num` function that initializes a special object | |
| // On the special object we define a property that acts like a function. This function | |
| // calls a block/func the amount of times equal to the value passed in at the time of | |
| // instance initialization. | |
| var Num = function(num) { | |
| var SpecialNumber = { value: num } | |
| Object.defineProperty(SpecialNumber, 'times', { | |
| get: function() { |
| var packages = [ | |
| 'dbcli', | |
| 'meow', | |
| 'ruff', | |
| ] | |
| function getInfo(name, cb) { | |
| if (name === 'dbcli') { | |
| setTimeout(() => { | |
| cb({ |
| fetch('binary_file1.dat').then(function(response) { | |
| return response.blob() | |
| }) | |
| .then(function(blobData) { | |
| var reader, header, level; | |
| reader = new FileReader() | |
| reader.addEventListener('loadend', function() { | |
| // Each 16bit unsigned value is two bytes in size | |
| // By asking for 0, 3 (pos 0-3) of the result we are taking 6 bytes. | |
| header = new Uint16Array(reader.result, 0, 3) |
| # Go the temp directory on your machine | |
| cd /tmp | |
| # Download the 10.11 sdk from apple | |
| wget http://adcdownload.apple.com/Developer_Tools/Command_Line_Tools_macOS_10.11_for_Xcode_8.2/Command_Line_Tools_macOS_10.11_for_Xcode_8.2.dmg | |
| # (If you don't have wget copy the dmg to the `/tmp` folder) | |
| # Mount the dmg | |
| hdiutil attach Command_Line_Tools_macOS_10.11_for_Xcode_8.2.dmg |
| // site: http://www.beaufortonline.com/building-and-construction-terms-dictionary/ | |
| // Get element with class '.nine' | |
| var items = document.querySelector('.nine').getElementsByTagName('p'); | |
| // Find total amount of 'p' elements inside of tag with class '.nine' | |
| var total = items.length; | |
| // Collect terms and definitions | |
| var terms = {} |
| marketing: | |
| submit to electron | |
| hacker news | |
| electron weekly | |
| javascript weekly | |
| react weekly | |
| product hunt | |
| alternative to |