Skip to content

Instantly share code, notes, and snippets.

View Hecatoncheir's full-sized avatar
:octocat:
Focusing

Vitaliy Vostrikov Hecatoncheir

:octocat:
Focusing
View GitHub Profile
@Hecatoncheir
Hecatoncheir / gist:8e9919d7c202d4123bdeb3514962ad47
Last active September 26, 2016 09:12
Xvfb server like service
#!/bin/bash
#
# description: Xvfb server
#
# chkconfig: 345 99 01
# description: some startup script
# Get function from functions library
<!DOCTYPE html>
<html>
<head>
<title>Without check example</title>
<script defer src="without_check.dart" type="application/dart"></script>
<script defer src="packages/browser/dart.js"></script>
</head>
<body>
<host></host>
</body>
{
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": true,
"element-case": "lower",
"leading-zero": true,
"sort-order-fallback": "abc",
"space-before-colon": "",
@Hecatoncheir
Hecatoncheir / event_loop.dart
Created February 20, 2017 13:31 — forked from azenla/event_loop.dart
Simulation of the Dart Event Loop in Dart.
/// Dart is built around a timer, which basically schedules functions in a queue.
/// The Future class is essentially just sugar on top of the event loop.
/// To help people understand what the event loop actually does, I have written code which implements the event loop.
/// See https://www.dartlang.org/articles/event-loop/ for more information.
import "dart:async";
class EventLoop {
/// Function Queue.
static final List<Function> queue = [];
library page_view_component;
import 'dart:async';
import 'dart:html';
import 'package:angular2/angular2.dart';
import 'package:angular2/router.dart';
import 'package:angular2/platform/common.dart';
import 'package:angular2_components/angular2_components.dart';
@Hecatoncheir
Hecatoncheir / gist:f0bb763f5fb96f932189017df3366545
Created April 20, 2017 10:39 — forked from booherbg/gist:f812c9145d157d8945b2
Cross compiling a simple go server for windows

How to build Golang windows/arm static binaries from linux

Alternate title: Cross compiling Windows/Darwin/Linux amd64/386/arm all from linux

After fumbling around trying to figure out the go toolchain and cross compilation configuration, I ran across the wiki page on Go's homepage. It's super helpful, and worked out of the box. I'm including the necessary scripts here in case they get changed or lost, and we can help Google find it (since it's the first real source I've found that "Just Worked"). http://code.google.com/p/go-wiki/wiki/WindowsCrossCompiling

@Hecatoncheir
Hecatoncheir / example
Last active June 6, 2017 20:27
cayley
package main
import (
"database/sql"
"fmt"
"log"
"regexp"
"strings"
"time"
@Hecatoncheir
Hecatoncheir / cockroach
Last active June 13, 2017 17:44
For docker
docker pull cockroachdb/cockroach
docker run -p 8080:8080 -p 26257:26257 cockroachdb/cockroach start --insecure
@Hecatoncheir
Hecatoncheir / user
Last active October 16, 2017 13:01
vscode
{
"editor.fontFamily": "Cousine, monospace",
"editor.fontSize": 14,
"editor.lineHeight": 24,
"editor.formatOnType": true,
"editor.cursorBlinking": "phase",
"editor.renderIndentGuides": true,
"editor.renderLineHighlight": "all",
"editor.wordWrap": "on",
"editor.tabCompletion": true,
// my-tag.dart -----------------------------------------------------------------------
library components;
import 'package:html5/html.dart';
import 'package:polymer_element/polymer_element.dart';
@PolymerRegister('my-tag', template: 'my-tag.html')
abstract class MyTag extends PolymerElement {