Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
Focusing

Nikita Dudnik Nek

🎯
Focusing
View GitHub Profile
@Nek
Nek / shell.md
Last active Dec 21, 2017
Shell tricks
View shell.md

Files changed in current branch relatively to some other branch:

git checkout <notMainDev>
git diff --name-only <mainDev>

Take .js and .jsx file names from log and feed them to prettier rewiting them with output:

@Nek
Nek / .spacemacs
Last active May 17, 2017
My .spacemacs files
View .spacemacs
;; -*- mode: emacs-lisp -*-
;; This file is loaded by Spacemacs at startup.
;; It must be stored in your home directory.
(defun dotspacemacs/layers ()
"Configuration Layers declaration.
You should not put any user code in this function besides modifying the variable
values."
(setq-default
;; Base distribution to use. This is a layer contained in the directory
View project.clj
(defproject moodwiz "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url "http://example.com/FIXME"
:license {:name "Eclipse Public License"
:url "http://www.eclipse.org/legal/epl-v10.html"}
:dependencies [[org.clojure/clojure "1.8.0"]]
:resource-paths ["resources" "resources/vader-sentiment-analyzer-1.0.jar"]
:main moodwiz.core
)
View List jiras related to a particular file
View Object.create.js
// http://stackoverflow.com/a/10142212/195895
if (typeof Object.create !== 'function') {
Object.create = function (o) {
function F() {}
F.prototype = o;
return new F();
};
}
@Nek
Nek / index.js
Last active Aug 29, 2015
requirebin sketch
View index.js
var ticker = require("ticker")
var PIXI = require("pixi.js")
var stage = new PIXI.Stage(0xFFFFFF, true);
stage.interactive = true;
var renderer = PIXI.autoDetectRenderer(640, 480);
renderer.view.style.display = "block";
// add render view to DOM
document.body.appendChild(renderer.view);
@Nek
Nek / index.js
Created Jul 17, 2014
requirebin sketch
View index.js
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var Bacon = require("baconjs")
var canvas = document.createElement("canvas")
canvas.width = 500
canvas.height = 100
document.body.appendChild(canvas)
var box = document.createElement("div")
@Nek
Nek / index.js
Created Jul 7, 2014
requirebin sketch
View index.js
// example using the raf module from npm. try changing some values!
var requestAnimationFrame = require("raf")
var canvas = document.createElement("canvas")
canvas.width = 500
canvas.height = 500
document.body.appendChild(canvas)
var context = canvas.getContext("2d")
@Nek
Nek / bundle.js
Created Feb 5, 2014
transpiled code
View bundle.js
(function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);throw new Error("Cannot find module '"+o+"'")}var f=n[o]={exports:{}};t[o][0].call(f.exports,function(e){var n=t[o][1][e];return s(n?n:e)},f,f.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o<r.length;o++)s(r[o]);return s})({1:[function(require,module,exports){
var wrapGenerator = require('regeneratorify/runtime').wrapGenerator;
wrapGenerator.mark(listen);
function listen(el, evType) {
return wrapGenerator(function listen$($ctx) {
while (1) switch ($ctx.next) {
case 0:
if (!true) {
$ctx.next = 5;
You can’t perform that action at this time.