Skip to content

Instantly share code, notes, and snippets.

View romanitalian's full-sized avatar
🎯
Focusing

roman romadin romanitalian

🎯
Focusing
View GitHub Profile
@romanitalian
romanitalian / cube_3d.css
Created October 31, 2015 15:28
3dCube on css
body {
background-color: #CCCCCC;
font: 1em 'PT Sans', Tahoma, Arial;
}
#wrapper {
/* коммент */
margin: 80px;
perspective: 900px;
-webkit-perspective: 900px;
@romanitalian
romanitalian / mysql_parse_csv.sql
Created October 31, 2015 15:40
mysql_parse_csv
DELIMITER //
DROP PROCEDURE IF EXISTS explode_table //
CREATE PROCEDURE explode_table(bound VARCHAR(255), startstr INT, endstr INT)
BEGIN
DECLARE id INT DEFAULT 0;
DECLARE value TEXT;
DECLARE occurance INT DEFAULT 0;
DECLARE i INT DEFAULT 0;
{
"color_scheme": "Packages/User/SublimeLinter/darkula (SL).tmTheme",
"draw_white_space": "all",
"fallback_encoding": "Cyrillic (Windows 1251)",
"font_size": 8,
"highlight_line": true,
"highlight_modified_tabs": true,
"ignored_packages":
[
"Vintage"
'use strict';
(function () {
var Romanitalian = function(window, undefined ) {
var RomanitalianInfo = {
"personal": {
"name": "Roman",
"email": "01110010 01101111 01101101 01100001 01101110 01101001 01110100 01100001 01101100 01101001 01100001 01101110 00101110 01101110 01100101 01110100 01000000 01100111 01101101 01100001 01101001 01101100 00101110 01100011 01101111 01101101 ",
"birthday": '1986-07-01',
"getAge": function() {return new Date().getFullYear() - new Date(this.birthday).getFullYear()},
"career": "web programmer"

#Create bitbucket branch

##Create local branch

$ git checkout -b sync
Switched to a new branch 'sync'
$ git branch
  master
* sync
@romanitalian
romanitalian / replace_diacritic_chars.php
Last active January 30, 2016 17:31
Заменяет диакретические знаки на один или несколько не диакретических
<?php
/**
* Заменяет диакретические знаки
* how to use:
* $translated = Diacritic::getInstance()->translate('ёлка');
*/
class Diacritic extends Singleton
{
public $dict;
@romanitalian
romanitalian / spiral_matrix.py
Last active January 31, 2016 10:52
Не самый лучший вариант преобразования двумерной матрицы, заполняемой построчно - в матрицу заполняемую по спирали (@todo доработать)
__author__ = 'romanitalian'
class Matrix(self):
def __init__(self, m, n):
self.m = m
self.n = n
def print_matrix(self, a):
for c in range(len(a)):
for d in range(len(a)):
@romanitalian
romanitalian / spiral_matrix_from_runnable_com.py
Created January 31, 2016 10:35
Скрипт преобразования матрицы заполняемой построчно в матрицу заполняемую по спирали --- найден через гугление
#!/usr/bin/env python3
# http://runnable.com/VH7Isb3mRqUaaHCc/spiral-matrix-in-python
def change_direction(dx, dy):
# not allowed!3
if abs(dx+dy) != 1:
raise ValueError
if dy == 0:
return dy, dx
if dx == 0:
<?php
// You can use composer scripts to invoke this package - Leetify. Just add it to you composer.json:
// ...
// "require": {
// "romanitalian/leetify": "dev-master"
// }
// ...
// Or after init composer - execute this:
// composer require romanitalian/leetify
@romanitalian
romanitalian / .bashrc
Created March 3, 2016 19:20
my console aliases in .bashrc
alias t='tig'
alias du='du -h'
alias dus='du -hs * | sort -hr'
alias gd='git diff'
alias gdc='git diff --cached'
alias gh='git log --pretty=format:"%h %ad | %s%d [%an]" --graph --date=short'
alias gs='git status'
alias gus='dus'
alias co='git checkout'
alias com='git commit -am '