Skip to content

Instantly share code, notes, and snippets.

View zvlex's full-sized avatar

Aleksandre Zutikov zvlex

View GitHub Profile
#!/bin/sh
### BEGIN INIT INFO
# Provides: unicorn
# Required-Start: $all
# Required-Stop: $all
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: starts the unicorn app server
# Description: starts unicorn using start-stop-daemon
@zvlex
zvlex / paginate_helper.rb
Created April 7, 2016 10:20 — forked from maximum-pixels/paginate_helper.rb
This is a custom link renderer that will format the pagination bar with Bootstrap4 as well as AJAX (i.e. data-remote="true") to use jquery-ujs rails
module PaginateHelper
class PaginateJSLinkRenderer < WillPaginate::ActionView::LinkRenderer
def prepare(collection, options, template)
options[:params] ||= {}
options[:params]['_'] = nil
super(collection, options, template)
end
protected
def html_container(html)
{
"color_scheme": "Packages/Theme - Primer/primer.dark.tmTheme",
"ignored_packages":
[
"Vintage"
],
"index_files": true,
"theme": "Primer Dark.sublime-theme",
"theme_primer_sidebar_font_large": true,
"theme_primer_sidebar_tree_small": true,
@zvlex
zvlex / install.conf
Created February 29, 2016 19:33 — forked from Lh4cKg/install.conf
arch linux install configuration
1. select keymap
2. disk partitions
3. configure mirror list
4. base system install
5. configure fstab
6. configure hostname
7. configure locale | configure timezone
8. configure hardclock
9. configure network
10. configure pacman
@zvlex
zvlex / gist:a786814ff7bb6be8e467
Last active February 11, 2016 20:32
Install Node.js 5.x in Fedora 23
sudo dnf -y install https://rpm.nodesource.com/pub_5.x/fc/23/x86_64/nodesource-release-fc23-1.noarch.rpm
sudo dnf -y install nodejs
@zvlex
zvlex / 2015.md
Last active January 3, 2016 09:36

2015


Важное

  • Нашел первую удаленную работу Ruby/Rails программистом (через пол года не сработались, мой фейл)
  • Получил кучу знаний и наставлений от отличного ментора и человека (теперь я знаю куда двигаться дальше, Большое ему Спасибо за терпение)
  • Закончил университет! (тут должно быть - "Потерял 4 года жизни")
  • Обрел двух настоящих друзей
  • Определился с технологическим стеком на будущее (Ruby/Rails, Golang, JS)
@zvlex
zvlex / index.html
Last active November 21, 2015 19:41
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Vue.js comments component</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" integrity="sha512-dTfge/zgoMYpP7QbHy4gWMEGsbsdZeCXz7irItjcC3sPUFtf0kuFbDz/ixG7ArTxmDjLXDmezHubeNikyKGVyQ==" crossorigin="anonymous">
<script src="http://cdnjs.cloudflare.com/ajax/libs/vue/1.0.8/vue.min.js"></script>
</head>
<body class="container">
@zvlex
zvlex / app.js
Last active December 30, 2023 07:09
Vue Comments Example
// CommentBox component
Vue.component('comment-box', {
template: '#comment-box',
props: ['comments'],
events: {
'signal:addComment': function(comment) {
this.comments.push(comment);
}
@zvlex
zvlex / gist:84e31e9dbe2805c1cce6
Last active September 20, 2015 15:49 — forked from somebody32/gist:5232120
Список литературы для ознакомления с concurrent programming и реализацией этих принципов и подходов на ruby. Огромное спасибо @brainopia за составление.

Введение

Начать стоит отсюда. Не пугайтесь то, что это книга по незнакомой OS, эти термины практически везде одинаковые и здесь они изложены в понятной для начинающих форме.

http://www.qnx.com/developers/docs/6.4.1/neutrino/getting_started/s1_procs.html

Прочесть нужно треть главы до подраздела "Starting a process", если С не пугает, читайте полностью. После прочтения вы будете понимать, что такое process, thread, mutex, priorites, semaphores, scheduler, contex-switch, kernel states.

Ruby

@zvlex
zvlex / command.sh
Created September 10, 2015 14:03
Write ISO image on usb
sudo dd bs=4M if=/path/to/linux.iso of=/dev/sdb && sync