Skip to content

Instantly share code, notes, and snippets.

View vugluskr86's full-sized avatar

Vasliy Ivashkin vugluskr86

  • https://www.google.com/maps/@57.9233507,59.8669296,11z
View GitHub Profile
@vugluskr86
vugluskr86 / reload_service.sh
Created February 13, 2019 14:41
Portainer and docker utils (recreate container in stack)
#!/bin/bash -x
#
# Manage docker with portainer api
set -x
STACK_NAME="scriptdev"
SERVICE_NAME="runner"
ENDPOINT_ID=3
PORTAINER_URL=""
@vugluskr86
vugluskr86 / CsvExporter.js
Created June 24, 2016 19:38
Backbone.Collection CSV exporter. Client side
class CsvExporter {
constructor (collection, options) {
this.collection = collection;
this.options = {
format : false,
titles : false
};
_.extend(this.options, options || {});
}
$(document).on("ready", function(){
"use strict";
var RepairPost = Backbone.Model.extend({
url : "/repair/posts",
schema: {
name: { type : 'Text', validators: ['required'] }
}
});
var fs = require('fs');
function readLines(input, func) {
var remaining = '';
var lines = [];
input.on('data', function(data) {
remaining += data;
var index = remaining.indexOf('\n');
while (index > -1) {
@vugluskr86
vugluskr86 / README.md
Created January 25, 2016 17:57 — forked from markusfisch/README.md
bash script to build a texture atlas with a little help from ImageMagick

mkatlas

[BASH][1] script to build a [texture atlas][2] for small/medium web sites/games. Requires [ImageMagick][3].

Usage

Basic