Skip to content

Instantly share code, notes, and snippets.

@EldarAliiev
EldarAliiev / docker-compose.yml
Last active March 1, 2017 20:16
Standart development server for PHP
version: '2'
services:
nginx:
restart: always
image: nginx:latest
container_name: nginx
ports:
- "80:80"
links:
- apache
@EldarAliiev
EldarAliiev / gulpfile.js
Last active March 3, 2017 16:04
Simple Gulp file
/*!
* Gulp file example
*
* Date: 2017-03-01T20:02Z
*/
// Initialize plugins
var gulp = require('gulp'),
plugins = require('gulp-load-plugins')();
@EldarAliiev
EldarAliiev / Gruntfile.js
Last active March 1, 2017 20:26
Simple Grunt file
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
staticPath: 'assets',
pkg: grunt.file.readJSON('package.json'),
clean: {
js: [
'<%= staticPath %>/js/vendor/*'
],
@EldarAliiev
EldarAliiev / archlinux.sh
Last active July 22, 2023 13:03
Arch Linux install commands
#!/bin/bash
# Создание разделов
cgdisk /dev/sda
# Форматирование разделов
mkfs.fat -F32 /dev/sda1
mkswap /dev/sda2 -L swap
mkfs.ext4 /dev/sda3 -L root
mkfs.ext4 /dev/sda4 -L home
@EldarAliiev
EldarAliiev / rsa.py
Last active April 3, 2017 14:56
Simple python test
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
Special function for RSA keys
Author: Eldar Aliiev
Email: e.aliiev@vnmu.edu.ua
"""
import sys
#!/usr/bin/python
# -*- coding: utf-8 -*-
from threading import Thread, current_thread
from queue import Queue
thread_count = 25
def run(queue, result_queue):
#!/usr/bin/python
# -*- coding: utf-8 -*-
"""
EDBO connector
Author: Eldar Aliiev
Email: e.aliiev@vnmu.edu.ua
"""
__license__ = "Cecill-C"
sudo: false
language: python
python:
- "2.7"
- "3.6"
install: pip install tox-travis
script: tox
notifications:
email: false
@EldarAliiev
EldarAliiev / clear_music.py
Created August 31, 2017 14:59
Delete all audio meta information
#!/usr/bin/python
#-*- coding: utf-8 -*-
import glob
from mutagen.mp3 import MP3
for track in glob.glob('/home/<user>/Music/*.mp3'):
mp3 = MP3(track)
try:
mp3.delete()
#!/usr/bin/python
#-*- coding: utf-8 -*-
numeral_map = tuple(zip(
(1000, 900, 500, 400, 100, 90, 50, 40, 10, 9, 5, 4, 1),
('M', 'CM', 'D', 'CD', 'C', 'XC', 'L', 'XL', 'X', 'IX', 'V', 'IV', 'I')
))
def int_to_roman(i):
result = []