Skip to content

Instantly share code, notes, and snippets.

View vasiliy0s's full-sized avatar

Vasiliy Telyatnikov vasiliy0s

View GitHub Profile
@vasiliy0s
vasiliy0s / genpassword
Created April 8, 2022 12:53 — forked from romaonthego/genpassword
Bash script: genpassword
#!/bin/bash
charspool=('a' 'b' 'c' 'd' 'e' 'f' 'g' 'h' 'i' 'j' 'k' 'l' 'm' 'n' 'o' 'p'
'q' 'r' 's' 't' 'u' 'v' 'w' 'x' 'y' 'z' '0' '1' '2' '3' '4' '5' '6' '7'
'8' '9' '0' 'A' 'B' 'C' 'D' 'E' 'F' 'G' 'H' 'I' 'J' 'K' 'L' 'M' 'N' 'O'
'P' 'Q' 'R' 'S' 'T' 'U' 'V' 'W' 'X' 'Y' 'Z' '-' '_');
len=${#charspool[*]}
if [ $# -lt 1 ]; then
@vasiliy0s
vasiliy0s / generate.js
Created September 6, 2017 06:59 — forked from dehamzah/generate.js
Generate secret key in NodeJS
require('crypto').randomBytes(48, function(err, buffer) { var token = buffer.toString('hex'); console.log(token); });
@vasiliy0s
vasiliy0s / Makefile
Last active May 17, 2017 13:26
Makefile for Go Projects
GOPATH=$(shell pwd)/vendor:$(shell pwd)
GOBIN=$(shell pwd)/bin
GOFILES=$(wildcard *.go)
GONAME=$(shell basename "$(PWD)")
PID=/tmp/go-$(GONAME).pid
build:
@echo "Building $(GOFILES) to ./bin"
@GOPATH=$(GOPATH) GOBIN=$(GOBIN) go build -o bin/$(GONAME) $(GOFILES)
@font-face {
font-family: 'MyFontFamily';
src: url('myfont-webfont.eot?') format('eot'),
url('myfont-webfont.woff') format('woff'),
url('myfont-webfont.ttf') format('truetype'),
url('myfont-webfont.svg#svgFontName') format('svg');
}
@mixin border-radius($radius, $prefixes: -moz -webkit -o) {
@each $prefix in $prefixes {
#{$prefix}-border-radius:$radius;
}
border-radius:$radius;
}
#id {
@include border-radius(5px, -moz -webkit);
@vasiliy0s
vasiliy0s / rAF.js
Last active August 29, 2015 14:06 — forked from paulirish/rAF.js
// http://paulirish.com/2011/requestanimationframe-for-smart-animating/
// http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating
// requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel
// MIT license
(function() {
var lastTime = 0;
var vendors = ['ms', 'moz', 'webkit', 'o'];
module.exports = function(grunt) {
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
},
dist: {
src: [
'app_src/*.js',