Skip to content

Instantly share code, notes, and snippets.

View slacktracer's full-sized avatar

Thiago F slacktracer

  • An island.
View GitHub Profile
const flatten = function flatten(array) {
const flattened = array.reduce(
function reducer(reduced, arrayItem) {
const arrayItemIsArray = Array.isArray(arrayItem);
if (arrayItemIsArray) return reduced.concat(flatten(arrayItem));
<h1>intalg</h1>
<script src="node_modules/intalg/dist/intalg.min.js"></script>
<script>
const intervals = [
{
begin: 19,
end: 31,
type: 'rent'
}
]
'use strict';
const defaultHost = 'localhost';
const defaultPort = 9229;
const defaultPoll = false;
const launchDefaults = false;
const notificationId = 'pollForDevTools';
const interval = 500;
let openedInspectorTab = null;
let notificationActive = false;
import action from "./controller";
router.get("/:user/status/", authenticate, function(request, response) {
const user = request.params.user;
action(user)
.then(value => response.json(value))
.catch(reason => response.json({ data: reason, status: 500 }));
});
function authenticate(request, response, next) {
@slacktracer
slacktracer / messing_with_traits.js_1.js
Created January 26, 2016 04:15
Messing with traits.js
// import importedTrait from 'modules/importedTrait';
const importedTrait = Trait({
direction() {
return this.colours;
}
});
const gameThingTrait = Trait({
// gps: 1337,
render() {
this.fun += 1;
@slacktracer
slacktracer / gist:6f190734535de7640b2f
Last active August 29, 2015 14:14
field(player);
Hello, World!
<a
data-ng-click="main.currentView = 'views/other.html'"
href="#"
>
Testing
</a>
//
background: linear-gradient(270deg, #51b49a, #e6a55a);
background-size: 400% 400%;
-webkit-animation: AnimationName 30s ease infinite;
-moz-animation: AnimationName 30s ease infinite;
animation: AnimationName 30s ease infinite;
@-webkit-keyframes AnimationName {
0%{background-position:0% 50%}
50%{background-position:100% 50%}
@slacktracer
slacktracer / jitsu deploy --debug
Created November 19, 2014 00:39
jitsu deploy --debug
info: Welcome to Nodejitsu jaywalking101
info: jitsu v0.14.0, node v0.10.33
info: It worked if it ends with Nodejitsu ok
info: Executing command deploy
info: Analyzing application dependencies in main.js
WARN package.json cookie-signature@1.0.1 No repository field.
WARN package.json range-parser@0.0.4 No repository field.
WARN package.json policyfile@0.0.4 'repositories' (plural) Not supported.
WARN package.json Please pick one as the 'repository' field
info: Creating snapshot 0.0.2-25
npm ERR! Failed to change folder ownership under npm cache for %s /root/tmp/tmp-58971bsn5now/npm-cache/_git-remotes/https-github-com-slacktracer-log-js-git-ee852af3
npm ERR! Error: EPERM, chown '/root/tmp/tmp-58971bsn5now/npm-cache/_git-remotes/https-github-com-slacktracer-log-js-git-ee852af3/FETCH_HEAD'
npm ERR! { [Error: EPERM, chown '/root/tmp/tmp-58971bsn5now/npm-cache/_git-remotes/https-github-com-slacktracer-log-js-git-ee852af3/FETCH_HEAD']
npm ERR! errno: 50,
npm ERR! code: 'EPERM',
npm ERR! path: '/root/tmp/tmp-58971bsn5now/npm-cache/_git-remotes/https-github-com-slacktracer-log-js-git-ee852af3/FETCH_HEAD',
npm ERR! parent: 'siga' }
npm ERR!
npm ERR! Please try running this command again as root/Administrator.
@slacktracer
slacktracer / input
Last active August 29, 2015 14:09
A tentative reference json for RT Analyzer...(input) Very incomplete.
Pos,Name,Ct SYBR,Amount SYBR,Target SYBR
A1,,20.73,-,
A2,,19.66,-,
A3,,18.66,-,
A4,,17.64,-,
A5,,17.11,-,
A6,,29.74,-,
A7,,25.68,-,
A8,,24.6,-,
A9,,23.51,-,