Skip to content

Instantly share code, notes, and snippets.

View sebmck's full-sized avatar

Sebastian sebmck

  • 10:20 (UTC -05:00)
View GitHub Profile
function getValues () {
return {
a: 1,
b: 2
};
}
let {a, b} = getValues();
console.log(a, b);
interface LoginNavState {
showLoginOptions: boolean
}
class LoginNav extends React.Component<{}, LoginNavState> {
constructor() {
super()
this.state = {
showLoginOptions: false
@sebmck
sebmck / Column.js
Created September 16, 2015 03:35 — forked from ryanflorence/Column.js
import React from 'react';
import { Flex } from 'jsxstyle';
class Column extends React.Component {
render () {
return <Flex {...this.props} direction="column"/>;
}
}
export default Column;
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)});
}
});
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) {
HarbourHTTP = function(ip, port){
};
HarbourHTTP.prototype.get = function(){
};
Harbour.registerPlugin(HarbourHTTP, [80]);
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]);
});
$(document).ready(function(){
var count = 0;
setInterval(function(){
$('#counter').text(++count);
$('#cost').text('$' + (count * 0.19));
}, 5400);}
);
<?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
var x = {
foo: 123,
hello: 456,
what: 789
};