Skip to content

Instantly share code, notes, and snippets.

View mnorkin's full-sized avatar
🐙

Maksim Norkin mnorkin

🐙
View GitHub Profile
<body>
<div id="signature">
<p>Yay</p>
</div>
</body>
@mnorkin
mnorkin / supervisord.service
Created June 3, 2016 05:55 — forked from tonyseek/supervisord.service
Running supervisord with systemd.
[Unit]
Description=supervisord - Supervisor process control system for UNIX
Documentation=http://supervisord.org
After=network.target
[Service]
Type=forking
ExecStart=/usr/bin/supervisord -c /etc/supervisord.conf
ExecReload=/usr/bin/supervisorctl reload
ExecStop=/usr/bin/supervisorctl shutdown
@mnorkin
mnorkin / file_read.m
Created January 18, 2016 16:28
file_read.m
fileId = fopen('data/SiPt02_01.txt', 'r');
format = '%f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f %f';
sizeA = [19 Inf];
data = fscanf(fileId, format, sizeA);
@mnorkin
mnorkin / Module.php
Created June 3, 2015 06:37
How to solve zend array config merge
<?php
/**
* @author: Maksim Norkin
* @email: maksim.norkin@ruptela.lt
*/
namespace ZR\Cache\Adapter\Redis;
use Zend\Config\Reader\Json;
use Zend\EventManager\EventInterface;

Readmine Jira Comparison

Comparison of two major issue and project tracking software solutions. Only the difference parts are presented. Overlapping functionality, like git/svn/hg support is not displayed.

Redmine

Pros:

  • Free and Open Source [[1]]
@mnorkin
mnorkin / fab_user_create.py
Last active December 17, 2015 03:49
The example of deployment user creation, using the fabric
def setup_deploy_user():
"""
Create an account for an deploy user to access the server
"""
opts = dict(
deploy_user=env.deploy_user,
deploy_password=env.deploy_pass
)
opts['local_user'] = local('whoami', capture=True)
# Create user
@mnorkin
mnorkin / gist:4657961
Created January 28, 2013 18:42
Lazy latex compilation
#!/usr/bin/env bash
for i in $( ls *.tex ); do
pdflatex $i
done
\begin{figure}[H]
\begin{tikztimingtable}[scale=1.5]
Laikrodis & 56{c} \\
RC-5 paketas & LHLHHLHLHLHLHLLHHLLHLHHLHLLH \\
\extracode
\draw (0,1) circle (0.2pt); % Origin
\begin{pgfonlayer}{background}
\vertlines[blue]{1,2,...,27}
\end{pgfonlayer}
\end{tikztimingtable}
@mnorkin
mnorkin / server.c
Created January 21, 2011 07:20
Working code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "so_tcplib.h"
void error ( char *message )
{
printf( message );
exit(1);
}
#!/usr/bin/env python
import math
import cmath
import optparse
def main():
p = optparse.OptionParser(description='Outputs periodic signal data')
p.add_option('-n', '--number', default="10", help='This is periodic number. Default is 10.')
p.add_option('-o', '--output', default="data.dat", help='This is file name, where all the data will be stored. Default is "data.dat"')
options, arguments = p.parse_args()