This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getValues () { | |
return { | |
a: 1, | |
b: 2 | |
}; | |
} | |
let {a, b} = getValues(); | |
console.log(a, b); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React from 'react'; | |
import { Flex } from 'jsxstyle'; | |
class Column extends React.Component { | |
render () { | |
return <Flex {...this.props} direction="column"/>; | |
} | |
} | |
export default Column; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const parsed = { type: "File", program: parse(unsorted) }; | |
// Find all imports | |
let imports = [] | |
traverse(parsed, { | |
ImportDeclaration(node, parent) { | |
imports.push({node, text: unsorted.substring(node.start, node.end)}); | |
} | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function rangify(list){ | |
list = list.map(Number).sort(function(a, b){ return a - b; }); | |
list.push(0); | |
var adder, i, list, number, rangeStart, ranges, _fn, _len; | |
ranges = []; | |
rangeStart = list[0]; | |
adder = 0; | |
_fn = function(number) { | |
if (number !== adder + 1 || i === list.length - 1) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
HarbourHTTP = function(ip, port){ | |
}; | |
HarbourHTTP.prototype.get = function(){ | |
}; | |
Harbour.registerPlugin(HarbourHTTP, [80]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Harbour.prototype.parseTargets = function(){ | |
var longestIP, longestHost; | |
var newTargets = []; | |
var oldTargets = this.options.targets.split(','); | |
oldTargets.forEach(function(target){ | |
if(net.isIP(target)){ | |
dns.reverse(target, function(err, domains){ | |
newTargets.push([(domains ? domains[0] : ''), target]); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$(document).ready(function(){ | |
var count = 0; | |
setInterval(function(){ | |
$('#counter').text(++count); | |
$('#cost').text('$' + (count * 0.19)); | |
}, 5400);} | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class Collisions { | |
public static function CheckCollision($a, $b){ | |
if( | |
$a->size == 0 || $b->size == 0 || | |
!$a->ShouldCollide($b) || !$b->ShouldCollide($a) || | |
$a->pos-x - $a->size > $b->pos->x + $b->size || | |
$a->pos-x + $a->size < $b->pos->x - $b->size || | |
$a->pos-y - $a->size > $b->pos->y + $b->size || | |
$a->pos-y + $a->size < $b->pos->y- $b->size |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var x = { | |
foo: 123, | |
hello: 456, | |
what: 789 | |
}; |
OlderNewer