Skip to content

Instantly share code, notes, and snippets.

View yatskevich's full-sized avatar

Ivan Yatskevich yatskevich

  • VictoriaMetrics Inc.
  • Amsterdam, The Netherlands
  • LinkedIn in/yatskevich
View GitHub Profile
@yatskevich
yatskevich / commands
Last active December 25, 2015 17:39
Configure EC2 instance - ubuntu-precise-12.04-amd64-server-20130411.1 (ami-d0f89fb9)
sudo apt-get update && time sudo apt-get dist-upgrade # http://askubuntu.com/questions/194651/why-use-apt-get-upgrade-instead-of-apt-get-dist-upgrade
# fix locale issues
# http://codetheory.in/fixing-locale-warnings-notices-issues-on-linux-server-or-desktop/
# http://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue
sudo vim /etc/environment
# and put the following variables into it
> LC_ALL=en_US.UTF-8
> LANG=en_US.UTF-8
@yatskevich
yatskevich / chef.md
Last active December 22, 2015 20:39
Chef + Berkshelf + Vagrant

Install Chef (chef-client, chef-solo, knife)

curl -L https://www.opscode.com/chef/install.sh | sudo bash

Use knife-solo

Use Berkshelf

  • generate application cookbook using Berkshelf
@yatskevich
yatskevich / Helpers.scala
Created September 5, 2013 15:42
Normalize GET URLs in Play Framework 2.x
package controllers
import play.api.mvc._
import play.api.mvc.Results._
object Application extends Controller {
def untrail(path: String) = Action {
MovedPermanently("/" + path)
}
@yatskevich
yatskevich / Gruntfile.js
Last active December 22, 2015 01:59
grunt-bower-task issue #66
module.exports = function(grunt) {
grunt.initConfig({
dosmth: {
before: 'logging',
after: 'exiting'
},
bower: {
install: { }
}