Skip to content

Instantly share code, notes, and snippets.

View sosnovskyas's full-sized avatar

Alexey Sosnovsky sosnovskyas

View GitHub Profile
@sosnovskyas
sosnovskyas / gulpfile.js
Created July 9, 2015 08:09
default gulp setting
var gulp = require("gulp");
var connect = require("gulp-connect");
var opn = require("opn");
var jade = require('gulp-jade');
//запускаем локальный сервер
gulp.task('connect', function() {
connect.server({
root: 'app',
livereload: true,
@sosnovskyas
sosnovskyas / aix_rm_all_path
Created September 24, 2015 15:58
aix_rm_all_path
#!/bin/sh
#################################################################################
# #
# Developed by #
# Alexey Sosnovsky #
# #
#################################################################################
lspath -p $1 -H -F"name parent connection" | awk ' /hdisk/ {print "rmpath -dl " $1 " -p " $2 " -w " $3 }' ; # list all hdisks by device name and filterin by second column
#!/bin/sh
#################################################################################
# #
# Developed by #
# Alexey Sosnovsky #
# #
#################################################################################
# 1.0
# - start\stop stendbay
@sosnovskyas
sosnovskyas / lorem.jade
Last active September 25, 2015 09:23 — forked from geedmo/lorem.jade
Lorem Ipsum generator mixin for Jade (single paragraph)
//- ----------------------------------
//- Usage:
//- include lorem
//- p
//- mixin lorem(25)
//- ----------------------------------
.multiline-ellipsis {
display: block;
display: -webkit-box;
max-width: 400px;
height: 109.2px;
margin: 0 auto;
font-size: 26px;
line-height: 1.4;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
@sosnovskyas
sosnovskyas / footer.css
Last active December 1, 2015 08:37
Прижатый footer
@sosnovskyas
sosnovskyas / Gulpfile.js
Created November 18, 2015 00:03 — forked from webdesserts/Gulpfile.js
Automatically reload your node.js app on file change with Gulp (https://github.com/wearefractal/gulp).
// NOTE: I previously suggested doing this through Grunt, but had plenty of problems with
// my set up. Grunt did some weird things with scope, and I ended up using nodemon. This
// setup is now using Gulp. It works exactly how I expect it to and is WAY more concise.
var gulp = require('gulp'),
spawn = require('child_process').spawn,
node;
/**
* $ gulp server
* description: launch the server. If there's a server already running, kill it.
@sosnovskyas
sosnovskyas / app.js
Created December 7, 2015 10:02 — forked from sogko/app.js
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');
@sosnovskyas
sosnovskyas / guid-update.js
Last active September 5, 2016 20:36
re-generate guid's in file
var fs = require('fs');
var guid = /([0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/ig;
var inputFile = 'input.json';
var outputFile = 'result.json';
// читаем
fs.readFile(inputFile, 'utf8', function (err,data) {
if (err) {
return console.log(err);