Skip to content

Instantly share code, notes, and snippets.

View niktayv's full-sized avatar
🎯
Focusing

Yuri Vyatkin niktayv

🎯
Focusing
View GitHub Profile
@niktayv
niktayv / index.html
Created February 21, 2024 02:07
Slomux
<div id="app" />
@niktayv
niktayv / new_project.sh
Created March 1, 2019 09:32 — forked from simonrenoult/new_project.sh
Script to bootstrap a nodejs project
project_name=$1
project_description=$2
location=$HOME/code/$project_name
pkg=$location/package.json
readme=$location/readme.md
node_version=$(node --version)
npm_version=$(npm --version)
if [ -z "$project_name" ]; then
echo "Error: a project name must be provided."
// 2018-06-06/08
// Following the article http://dominictarr.com/post/149248845122/pull-streams-pull-streams-are-a-very-simple
// values is a source pull-stream
function values(array) {
var i = 0
return function (abort, cb) {
if(abort) return cb(abort)
// console.log('Hello from closure, i=', i)
return cb(i >= array.length ? true : null, array[i++])
}
@niktayv
niktayv / files_to_date_dirs
Created June 6, 2018 03:06
Move all files in a directory to folders named with the corresponding modification dates
#!/bin/bash
set -e
echo "This script will move all the files in $PWD"
echo "... into subdirectories with names YYYY-MM-DD"
echo "... corresponding to the file modification dates"
echo "If you wish to continue, type yes:"
read -p "Are you sure? " -r
if [ "$REPLY" != "yes" ]; then
exit
fi
@niktayv
niktayv / zero.js
Created October 26, 2017 05:59
ClashLS
import {
randomMove,
getDirection,
isVisible,
canKill,
safeRandomMove,
fastGetDirection,
turn,
getDistance
} from '../lib/utils.js'
@niktayv
niktayv / Readme.md
Created June 30, 2016 21:18
A Powershell script for sorting out my photos

Photos need to be sorted

The Problem

I like unloading my photos from all the devices into a folder periodically, and then have them moved into subfolders named as "YYYYMMDD" according to their file date. Doing this manually is of course tedious.

@niktayv
niktayv / ubuntu-setup.md
Last active August 6, 2022 15:58 — forked from don-smith/mac-setup.md
How I treat each new Ubuntu I approach

My Ubuntu Setup Guide

This guide I use whenever I start working with a brand new Ubuntu on my laptop.

The current version of this guide assumes Ubuntu 22.04 LTS.

Desktop Applications

Before any development starts I need to organize my life.

@niktayv
niktayv / Gruntfile.coffee
Last active August 29, 2015 14:26
These are the files from Landon Schropp's Grunt tutorial: http://www.sitepoint.com/writing-awesome-build-script-grunt/
module.exports = (grunt) ->
# configure the tasks
grunt.initConfig
copy:
build:
cwd: "source"
src: [
"**"
"!**/*.styl"