Skip to content

Instantly share code, notes, and snippets.

View avdept's full-sized avatar
🏠
Working from home

Alex Sinelnikov avdept

🏠
Working from home
View GitHub Profile
@avdept
avdept / .rubocop.yml
Last active November 15, 2017 09:51
My personal rubocop config. Will add more soon
Metrics/LineLength:
Max: 120
AllCops:
TargetRubyVersion: 2.2
# Too short methods lead to extraction of single-use methods, which can make
# the code easier to read (by naming things), but can also clutter the class
Metrics/MethodLength:
Max: 20
Metrics/ClassLength:
#!/bin/sh -e
# upstart-job
# Put file into /etc/init.d
# Service available as sudo service {filename} start
# Make sure you chmod +x file
# To add service to auto start -> sudo update-rc.d {filename} defaults
echo "starting unicorn after reboot"
exec sudo -u ubuntu bash -c "cd /home/ubuntu/apps/app_name/prod/current && ~/.rvm/bin/rvm default do bundle exec unicorn_rails -c /home/ubuntu/apps/app_name/prod/current/config/unicorn/production.rb -E production -D"
(1..100).to_a.each do |num|
str = ""
numb = num
if num % 3 == 0
str += "fuzz"
numb = ''
end
if num % 5 == 0
@avdept
avdept / window with sdl2 and texture golang
Created May 25, 2015 20:30
window with sdl2 and texture golang
package main
import (
"github.com/veandco/go-sdl2/sdl"
"github.com/veandco/go-sdl2/sdl_image"
"fmt"
)
const(
SCREEN_WIDTH int = 1440
@avdept
avdept / minesweeper in golang
Last active August 29, 2015 14:21
console minesweeper in go lang
package main
import (
"fmt"
"math/rand"
"time"
"strconv"
)