Skip to content

Instantly share code, notes, and snippets.

Kirill Saksin saksmt

Block or report user

Report or block saksmt

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@saksmt
saksmt / fsplit.py
Last active Nov 15, 2016 — forked from bancek/cue_to_mp3.py
CUE splitter using ffmpeg (to source format)
View fsplit.py
#!/usr/bin/env python2
# Shit code.. TODO: rewrite
import sys
import os
import os.path
import subprocess
import itertools
View setter.vl
/**
* @param ${TYPE_HINT} $${PARAM_NAME}
#if (${STATIC} != "static")
* @return ${CLASS_NAME} This instance
#end
*/
#set($TYPE_HINT = $TYPE_HINT.replaceAll("(int(eger)?)|(bool(ean)?)|(string)|object|mixed", ""))
#if (${TYPE_HINT} != "")
#set($TYPE_HINT="${TYPE_HINT} ")
#end
@saksmt
saksmt / CodeStyle.md
Last active Aug 29, 2015
Java Code Style (B52)
View CodeStyle.md

Именование

Общий Стиль

Никакие сокращения не допускаются.

Именование должно быть таким, что код легко понять и без коментариев.

View .config
#
# Gentoo Linux
#
CONFIG_GENTOO_LINUX=y
CONFIG_GENTOO_LINUX_UDEV=y
#
# Support for init systems, system and service managers
#
# CONFIG_GENTOO_LINUX_INIT_SCRIPT is not set
@saksmt
saksmt / TableRendererInterface.php
Last active Aug 29, 2015
Abstraction on table rendering
View TableRendererInterface.php
<?php
/**
* @example
* $htmlRenderer = new HtmlRenderer();
* $consoleRenderer = new ConsoleRenderer();
* $htmlRenderer->renderToFile($view, 'some.html', [ TableRendererInterface::STREAMED ]);
* echo $consoleRenderer->renderToString($profilingView);
*/
interface TableRendererInterface
@saksmt
saksmt / ObjectOriented.js
Created Feb 26, 2015
Extension for JavaScript providing object oriented feature
View ObjectOriented.js
(function (global) {
'use strict';
/**
* @return {Function} Abstract function placeholder
*/
Function.prototype.makeAbstract = function () {
return function () {
throw new Error('Abstract method can\'t be called.');
};
};
@saksmt
saksmt / README.md
Created Dec 21, 2014
Flac(cue) splitting commandline utility
View README.md

music-splitter

Simple commandline utility providing support for reqursively walk through all music directories and split large .flac files.

Requirements

Any linux distribution with split2flac, php and find.

@saksmt
saksmt / clock.js
Created Dec 9, 2014
Clock for Browser(Usefull with 2 monitors)
View clock.js
(function (window) {
'use stict';
/**
* Replaces "{slug}" with specified values, provided by argument
* @brief Set's slugs in string
* @param {Object} slugValues Map "slugName:slugValue"
* @returns {String}
*/
String.prototype.setSlugs = function (slugValues) {
var
@saksmt
saksmt / gist:baebd25deca65a792aee
Created Oct 1, 2014
Java: get all implementations of interface
View gist:baebd25deca65a792aee
interface Interface {}
class InterfaceImpl1 implements Interface {}
class InterfaceImpl2 implements Interface {}
class Main {
private static List<Class<? extends Interface>> interfaceImplementations;
static {
interfaceImplementations = new ArrayList(Interface.class.getClasses()); // <- Doesn't work :(
}
View UnitOfWork.java
package com.smt.todo.model;
public class UnitOfWork {
private static UnitOfWork soleInstance = null;
private FinderInterface finder;
public static UnitOfWork getInstance() {
UnitOfWork.initialize();
return UnitOfWork.soleInstance;
You can’t perform that action at this time.