Skip to content

Instantly share code, notes, and snippets.

View Nek's full-sized avatar
🏠
Working from home

Nikita Dudnik Nek

🏠
Working from home
View GitHub Profile
@Nek
Nek / success1.md
Last active December 27, 2015 23:09
To fix the problem: 1. newline added after the code block 2. newline added after the last code block 3. newline added after the last code block 4. newline added after the last code block AND after the ABC
Title: A 2012 blog post
Date: 2012-01-01T00:00:00
Tags: foo, bar, tag with spaces, baz
(defn a 5)
@Nek
Nek / error1.md
Last active December 27, 2015 23:09
Title: A 2012 blog post
Date: 2012-01-01T00:00:00
Tags: foo, bar, tag with spaces, baz
(defn a 5)
@Nek
Nek / gist.html
Created September 27, 2013 17:34
Inject github gist after window load event.
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title> - jsFiddle demo</title>
<script type='text/javascript' src='//code.jquery.com/jquery-2.0.2.js'></script>
<script type='text/javascript' src="//rawgithub.com/krux/postscribe/master/dist/postscribe.min.js"></script>
</head>
@Nek
Nek / level.hx
Created August 26, 2013 08:43
My neat level description format.
screens = [
Hint(["01mouse", "spike"],"aumloop"),
Level([HeadSpikes(.2,100,0)], 10), // 1
Level([HeadSpikes(.2,150,10)], 10), // 1
Level([HeadSpikes(.2,150,20)], 10), // 1
Hint(["csaw"],"aumloop"),
Level([CenterSaws(.4,100,5)],8.0), // 2
Level([CenterSaws(.3,100,5)],8.0), // 3
Level([SmartSaws(.3,100,10)],8.0), // 4
@Nek
Nek / painter.html
Created August 1, 2012 06:37
Simple canvas painting using flapjax.
<!DOCTYPE html>
<html>
<head>
<title></title>
<script type="text/javascript" src="http://www.flapjax-lang.org/download/flapjax-2.1.js"></script>
<script type="text/javascript">
function loader() {
aCanvas = document.getElementById("canv");
mouseMovesAndOversE = mergeE(changes(mouseB(aCanvas)), $E(aCanvas,"mouseover"));
@Nek
Nek / snippet.el
Created July 27, 2012 14:50
keywords replacement in emacs
;; Use lambda for anonymous functions
(font-lock-add-keywords
'js2-mode `(("\\(function\\) *("
(0 (progn (compose-region (match-beginning 1)
(match-end 1) "\u0192")
nil)))))
;; Use right arrow for return in one-line functions
(font-lock-add-keywords
'js2-mode `(("function *([^)]*) *{ *\\(return\\) "
@Nek
Nek / serv.js
Created July 26, 2012 20:20
Simple server on node.js
var http = require("http");
var fs = require("fs");
var path = require("path");
var url = require("url");
var mimeTypes = {
"html": "text/html",
"jpeg": "image/jpeg",
"jpg": "image/jpeg",
"png": "image/png",