Skip to content

Instantly share code, notes, and snippets.

View vlaskinvlad's full-sized avatar

Vlad Vlaskin vlaskinvlad

  • Facebook
  • Berlin
View GitHub Profile
@vlaskinvlad
vlaskinvlad / ruby-power-11.rb
Created January 15, 2012 20:17
RubyPower.11: Ruby call private classes by his child
class Root
def initialize
p "Root init"
end
private
def root_private
p "Root private"
@vlaskinvlad
vlaskinvlad / ruby-power-13.rb
Created January 19, 2012 19:46
RubyPowerPart2
class Polygon
@@sides = 0
def self.sides
@@sides
end
end
class Triangle < Polygon
@@sides = 3
end
@vlaskinvlad
vlaskinvlad / gist:3664278
Created September 7, 2012 08:09
Cloudera repository to pom.xml
<repositories>
<repository>
<id>cloudera</id>
<url>https://repository.cloudera.com/artifactory/cloudera-repos/</url>
</repository>
</repositories>
@vlaskinvlad
vlaskinvlad / apache2_module_conf_generate.pl
Created October 3, 2012 09:29
apache2_module_conf_generate.pl
#!/usr/bin/perl
=begin
Generates Ubuntu style module.load files.
./apache2_module_conf_generate.pl /usr/lib64/httpd/modules /etc/httpd/mods-available
ARGV[0] is the apache modules directory, ARGV[1] is where you want 'em.
@vlaskinvlad
vlaskinvlad / jvm.sh
Last active December 10, 2015 03:08
Copy java 7 to jvm folder
#!/bin/bash
cd /usr/lib/jvm/
tar zxvf /tmp/jdk.gz
mv j2sdk1.6-oracle o6jsdk
mv jdk1.7.0_10 j2sdk1.7-oracle
ln -s j2sdk1.7-oracle j2sdk1.6-oracle
@vlaskinvlad
vlaskinvlad / blog_scala.scala
Created April 20, 2013 07:47
Gist for blog testing inclusion
class A {
def a = "Foo bar"
def b(c: String): Int = c.length
}
@vlaskinvlad
vlaskinvlad / revoke_openvpn_key.sh
Created May 25, 2016 13:27
Revoke a key from open vpn server
#!/bin/bash
export REVOKE_NAME="key-name"
cd /etc/openvpn/easy-rsa
. ./vars
./revoke-full ${REVOKE_NAME}
# to check the certificates
@vlaskinvlad
vlaskinvlad / update_android_sdk_ubuntu_noui.sh
Last active September 13, 2016 11:57
Update Android SDK on Ubuntu headless
android update sdk --no-ui
@vlaskinvlad
vlaskinvlad / remove_spaces_eols.sh
Created August 11, 2016 10:15
Remove spaces and EOLs
#!/bin/bash
perl -pi -e 's,[\r\n],,g' $@