Skip to content

Instantly share code, notes, and snippets.

View borlaym's full-sized avatar

Marton Borlay borlaym

  • Budapest, Hungary
View GitHub Profile
@borlaym
borlaym / gist:e1bb30b3b661fd390058
Created May 9, 2014 16:55
Sample JSON with schema
{
"_contents": {
"foo": "as",
"coll": [{
"_id": "422229c393c04778e27b2f741462de29",
"meow": false
}, {
"_id": "bd9c8df15ebbac93cdade595aaf958c2",
"meow": false
}, {
@borlaym
borlaym / gist:6c948341ebf6e69cc24a
Created May 11, 2014 20:35
MtG number of copies needed of each card for a Draft Simulator
var numberOfDifferentCards = 109;
var amountOfEach = 10;
var numberInBooster = 10;
var numberOfBoosters = 3;
var numberOfPlayers = 8;
var numberOfTests = 300;
var results = [];
console.clear();
<link rel="import" href="../google-map/google-map.html">
<polymer-element name="my-element">
<template>
<style>
:host {
position: absolute;
width: 100%;
height: 100%;
<link rel="import" href="../core-scaffold/core-scaffold.html">
<link rel="import" href="../core-header-panel/core-header-panel.html">
<link rel="import" href="../core-menu/core-menu.html">
<link rel="import" href="../core-item/core-item.html">
<link rel="import" href="../core-icon-button/core-icon-button.html">
<link rel="import" href="../core-toolbar/core-toolbar.html">
<link rel="import" href="../core-menu/core-submenu.html">
<link rel="import" href="../core-layout/core-layout.html">
<link rel="import" href="../core-icons/core-icons.html">
<link rel="import" href="../core-icon/core-icon.html">
@borlaym
borlaym / no letters no digits
Last active August 29, 2015 14:05
Writing text in javascript with no letters and no digits
((+[])[(/./[(!(+[])+'')[(+[])]+(!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!(+[])+'')[(+[])]]+"")[+(!+[])+(!+[])+(!+[])]+(/./[(!(+[])+'')[(+[])]+(!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!(+[])+'')[(+[])]]+"")[+(!+[])+(!+[])+(!+[])+(!+[])+(!+[])+(!+[])]+((+(!+[])/(+[]))+'')[+(!+[])]+(!!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!(+[])+'')[(+[])]+(!(+[])+'')[+(!+[])]+(!(+[])+'')[+(!+[])+(!+[])]+(/./[(!(+[])+'')[(+[])]+(!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!(+[])+'')[(+[])]]+"")[+(!+[])+(!+[])+(!+[])]+(!(+[])+'')[(+[])]+(/./[(!(+[])+'')[(+[])]+(!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!(+[])+'')[(+[])]]+"")[+(!+[])+(!+[])+(!+[])+(!+[])+(!+[])+(!+[])]+(!(+[])+'')[+(!+[])]]+"")[(+(!+[])<<+(!+[])+(!+[])+(!+[]))+(!+[])+(!+[])+(!+[])]+((+[])/(+[])+'')[+(!+[])]+(!(+[])+'')[+(!+[])]+(/./[(!(+[])+'')[(+[])]+(!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!!(+[])+'')[+(!+[])+(!+[])+(!+[])]+(!(+[])+'')[(+[])]]+"")[+(!+[])
@borlaym
borlaym / animals.json
Created December 15, 2014 13:38
Array of animal names
[
"Aardvark",
"Albatross",
"Alligator",
"Alpaca",
"Ant",
"Anteater",
"Antelope",
"Ape",
"Armadillo",
atom-beautify
atom-ternjs
docblockr
emmet
highlight-selected
language-scala
language-soy
linter-eslint
pigments
react
// components/Attribute.js
function Attribute(props) {
return (
<div>
<a onClick={props.onClick}>
{props.name}
</a>
</div>
);
@borlaym
borlaym / width.js
Last active February 20, 2019 13:26
Grid width mixin
// @flow
import * as styled from 'styled-components';
const SMALL_COL_NUMBER = 6;
const MEDIUM_COL_NUMBER = 8;
const LARGE_COL_NUMBER = 12;
const XLARGE_COL_NUMBER = 12;
const SMALL_GUTTER = 16;
const MEDIUM_GUTTER = 24;
const LARGE_GUTTER = 24;
def addGame(gameId: Long) = Action.async { implicit request =>
request.body.asJson.map{json =>
for {
players <- json \ "players"
} yield Ok()
}.getOrElse(Future(BadRequest())
}