Skip to content

Instantly share code, notes, and snippets.

View yuriihabrusiev's full-sized avatar
🎯
Focusing

Yurii Habrusiev yuriihabrusiev

🎯
Focusing
View GitHub Profile
@yuriihabrusiev
yuriihabrusiev / Dockerfile
Created April 5, 2024 14:49
Docked Rails
# Docked Rails
# Building:
# docker build -t docked-rails .
# Preparation:
# docker volume create ruby-bundle-cache
# alias docked='docker run --rm -it -v ${PWD}:/rails -u $(id -u):$(id -g) -v ruby-bundle-cache:/bundle -p 3030:3030 docked-rails'
# Usage:
@yuriihabrusiev
yuriihabrusiev / development.sh
Created November 7, 2013 15:12
Installing Ruby with rbenv on development and production boxes
#!/bin/bash
#
# Local Ruby with rbenv and ruby-build
## Update apt
sudo apt-get -y update
## Install git and curl
echo " ### INSTALLING GIT AND CURL ###"
sudo apt-get install -y git curl
@yuriihabrusiev
yuriihabrusiev / Ruby Run.sublime-build
Created December 23, 2013 15:54
Sublime Text Ruby build system
{
"selector": "source.ruby",
"path": "$HOME/.rbenv/shims:$PATH",
"file_regex": "^(.*):([\\d]+):(.*) (.*)$",
"variants": [
{
"cmd": ["ruby", "-wv", "$file"],
"name": "Run"
},
{
@yuriihabrusiev
yuriihabrusiev / .Xresources-gruvbox
Created August 1, 2013 13:29
Gruvbox Xresources
#define G_dark0 #282828
#define G_dark1 #3c3836
#define G_dark2 #504945
#define G_dark3 #665c54
#define G_dark4 #7c6f64
#define G_medium #928374
#define G_light0 #fdf4c1
#define G_light1 #ebdbb2
" VirtualEnv settings for Vim
" Copy this template to VIRTUAL_ENV as 'vimrc'
" And edit DJANGO_SETTINGS_MODULE
py << EOF
import os.path
import sys
import vim
# SET THIS MANUALLY
@yuriihabrusiev
yuriihabrusiev / Flake8.sublime-build
Created July 17, 2013 07:17
Flake8 build system for Sublime Text 3
{
"shell_cmd": "flake8 $file; echo",
"file_regex": "^(.*):(\\d+):(\\d+): (.*)$",
"selector": "source.python",
"variants": [
{
"shell_cmd": "python -u $file",
"file_regex": "^[ ]*File \"(...*?)\", line ([0-9]*)",
"name": "Run"
}
;сортировка
lea bx,arr ; аддрес массива
mov cx,N-1 ; кол-во элементов-1
cyc1:
push cx
xor si,si ; обнуляем индекс текущего элемента
mov di,2
mov cx,N-1
cyc2:
@yuriihabrusiev
yuriihabrusiev / multab.asm
Created March 5, 2012 09:56
Multiplication table
org 100h
use16
include 'dec_proc32.asm'
include 'lab4lib.asm'
mov CL,1
mov BL,1
mov dx,0
@yuriihabrusiev
yuriihabrusiev / screenlib.asm
Created March 5, 2012 07:14
Clean screen and move cursor
jmp lib_end
; #########################
cnsn:
push AX
push CX
push DX
push BX
mov AH,6; clean screen
mov AL,0
mov CX,0
@yuriihabrusiev
yuriihabrusiev / gist:1703282
Created January 30, 2012 08:10
ascii table
#!/usr/bin/env python
def main():
print "+-----------------------+"
for i in xrange(256):
print " | ", i, " | ", chr(i), " | "
print "+-----------------------+"
if __name__ == '__main__':