Skip to content

Instantly share code, notes, and snippets.

View iamstarkov's full-sized avatar
🔥

Vladimir Starkov iamstarkov

🔥
View GitHub Profile
Signature mix_sig = "mix($color-1, $color-2, $weight: 50%)";
BUILT_IN(mix)
{
Color* color1 = ARG("$color-1", Color);
Color* color2 = ARG("$color-2", Color);
Number* weight = ARGR("$weight", Number, 0, 100);
double p = weight->value()/100;
double w = 2*p - 1;
double a = color1->a() - color2->a();
import sublime, sublime_plugin
class TestCommand(sublime_plugin.ApplicationCommand):
def __init__(self):
super(TestCommand, self).__init__()
#do your stuf here
def run(self, edit):
pass
Require Import Coq.Program.Basics.
Require Import Coq.Program.Syntax.
Require Import Coq.Init.Datatypes.
Require Import Coq.Unicode.Utf8.
Open Local Scope program_scope.
Open Local Scope list_scope.
Open Local Scope type_scope.
Class Functor (φ : Type → Type) := {
@zwhitchcox
zwhitchcox / robot.spec.js
Last active September 26, 2016 18:28
test-script for robot
const sim = require('./simulation')
const humans = require('humans')
describe('#aiTest', function() {
beforeEach(function() {
humans.restore()
sim.restore()
})
it('should not kill all humans', function() {
@serhiiminin
serhiiminin / README.md
Last active February 23, 2018 10:18 — forked from iamstarkov/README.md
hackernews pwa checklist

hackernews pwa checklist

  • top stories index page
  • header and footer
  • pagination
  • post page
  • comments to post
  • more information about the post itself
  • user page
  • New, Top and Best Stories
@enaeher
enaeher / tiered_archives.rb
Created September 5, 2011 21:49
Tiered Archives plugin
# A quick and dirty plugin for Jekyll by Eli Naeher
#
# This plugin creates a site.years template variable which allow you to group archive links by year and month.
# The structure of site.years is:
# site.years = 2001=>[[post1, post2...], [...]], 2002=>[...]
#
# Usage should look something like this:
# {% for year in site.years %}
# <h2>Year {{ year.first.first.date | date: "%Y" }}</h2>
data:text/html, <style type="text/css">#e{position:absolute;top:0;right:0;bottom:0;left:0;font-size:16px}</style><div id="e"></div><script src="http://d1n0x3qji82z53.cloudfront.net/src-min-noconflict/ace.js" type="text/javascript" charset="utf-8"></script><script>var e=ace.edit("e");e.setTheme("ace/theme/monokai");e.getSession().setMode("ace/mode/php");</script>
@kitten
kitten / reactiveconf-sc-cfp.md
Last active November 17, 2020 15:06
ReactiveConf 2017 Lightning Talk CFP: With styled-components into the future

styled-components Logo

With styled-components into the future

Preprocessing is dead, long live preprocessing!


This is a CFP for ReactiveConf 2017's open call for Lightning talks. If you'd like to see this talk become a reality, please ⭐ star this gist. #ReactiveConf

@nhoizey
nhoizey / screenshots.js
Created November 12, 2012 17:07
Take screenshots at different viewport sizes using CasperJS
/*
* Takes provided URL passed as argument and make screenshots of this page with several viewport sizes.
* These viewport sizes are arbitrary, taken from iPhone & iPad specs, modify the array as needed
*
* Usage:
* $ casperjs screenshots.js http://example.com
*/
var casper = require("casper").create();
@rauchg
rauchg / effective-es6.md
Last active July 11, 2023 09:38
Writing ES6 today, effectively.

Effective transpiling of ES6

After publishing my article on ECMAScript 6, some have reached out to ask how I exactly I make it all work.

I refrained from including these details on the original post because they're subject to immiment obsoletion. These tools are changing and evolving quickly, and some of these instructions are likely to become outdated in the coming months or even weeks.

The main tool

When evaluating the available transpilers, I decided to use 6to5, which has recently been renamed to Babel. I chose it based on: