Skip to content

Instantly share code, notes, and snippets.

@sergej-brazdeikis
sergej-brazdeikis / txt
Created March 3, 2018 19:27
Saulius Prūsaitis - Būkime geriausiais draugais
Būkim draugais tik šiąnakt
Galim nebūti rytoj
Mes per trumpai gyvenam
Kad per ilgai apie tai galvoti
Būkim draugais kurie neišduoda
Prašo per daug - grąžina mažai
Būkim tokie, kurie supranta paguodą
Būkim draugais ir apsikeiskim laiškais
Būkim draugais…
@sergej-brazdeikis
sergej-brazdeikis / ec2-host-from-tag-to-env-vars.sh
Created June 8, 2016 13:06 — forked from marcellodesales/ec2-host-from-tag-to-env-vars.sh
Create Environment Variables in EC2 Hosts from EC2 Host Tags, just like Beanstalk or Heroku does!
######
# Author: Marcello de Sales (marcello.desales@gmail.com)
# Description: Create Create Environment Variables in EC2 Hosts from EC2 Host Tags
#
### Requirements:
# * Install jq library (sudo apt-get install -y jq)
# * Install the EC2 Instance Metadata Query Tool (http://aws.amazon.com/code/1825)
#
### Installation:
# * Add the Policy EC2:DescribeTags to a User
@sergej-brazdeikis
sergej-brazdeikis / blakesmith_terraform.tf
Created May 29, 2016 19:18 — forked from blakesmith/blakesmith_terraform.tf
Terraform setup for running blakesmith.me
provider "aws" {
alias = "prod"
region = "us-east-1"
access_key = "${var.aws_access_key}"
secret_key = "${var.aws_secret_key}"
}
resource "aws_s3_bucket" "origin_blakesmith_me" {
provider = "aws.prod"
@sergej-brazdeikis
sergej-brazdeikis / gist:63737f9472c96ff30db0
Created November 17, 2014 15:14
Install VBoxGuestAddtions
wget http://download.virtualbox.org/virtualbox/4.3.18/VBoxGuestAdditions_4.3.18.iso
sudo mkdir /media/iso
sudo mount -o loop VBoxGuestAdditions_4.3.18.iso /media/iso
cd /media/iso/
sudo ./VBoxLinuxAdditions.run
@sergej-brazdeikis
sergej-brazdeikis / Shairport_Ubuntu_install.sh
Created November 5, 2013 22:11
install Shairport on Ubuntu
#!/bin/bash
#
# Sources:
#
# http://askubuntu.com/questions/334691/make-command-not-working-for-installing-shairport
# https://github.com/abrasive/shairport
#
sudo apt-get install build-essential libssl-dev libcrypt-openssl-rsa-perl libao-dev libio-socket-inet6-perl libwww-perl avahi-utils pkg-config
@sergej-brazdeikis
sergej-brazdeikis / local-selenium.md
Last active December 25, 2015 20:59 — forked from neonstalwart/local-selenium.md
how to run intern geezer self test with a local selenium standalone server
brew install selenium-server-standalone chromedriver
git clone git@github.com:theintern/intern.git
cd intern
git checkout geezer
npm install --production
ln -s .. node_modules/intern
curl https://gist.github.com/neonstalwart/6630466/raw/f0e4e4efbefa40c746f7c68e2bb4fa0dd5215047/selftest.local.intern.js > tests/selftest.local.intern.js
java -jar /usr/local/opt/selenium-server-standalone/selenium-server-standalone-2.35.0.jar -p 4444 &
node node_modules/intern/runner.js config=tests/selftest.local.intern
@sergej-brazdeikis
sergej-brazdeikis / lessJsVariables
Created July 21, 2012 14:37
Less.js variables inside CSS property
// example how to use variable inside of CSS property name
.pv(@p,@v)
{
-:~`";@{p}:@{v}".replace(/'/g,"")`;
}
#container {
.pv('border-radius',10px);
}
@sergej-brazdeikis
sergej-brazdeikis / roundedCorners.less
Created July 21, 2012 13:28
Rounded Corners in Less.js
.rounded-corners (@radius: 5px) {
border-radius: @radius;
-webkit-border-radius: @radius;
-moz-border-radius: @radius;
}
#header {
.rounded-corners;
}
@sergej-brazdeikis
sergej-brazdeikis / cssPrefixes.less
Created July 21, 2012 11:43
Less.js function which generates all prefixes for given CSS property
/* Less.js function which generates prefixes any CSS property */
.pf(@prop, @value){
-:~`";"+"@{prop}:@{value};-webkit-@{prop}:@{value};-moz-@{prop}:@{value};-o-@{prop}:@{value};-ms-@{prop}:@{value}".replace(/'/g,"")`;
}
#container {
.pf('border-radius', 10px);
.pf('transform', 'rotate(7deg)');
.pf('transition','all 1s ease-in-out');
.pf('box-shadow','2px 2px 5px 0 rgba(0,0,0,.6)');
var mapObj = {
data: {},
_getBlock: function(i,j){
return this.data[i * this.elW + j];
},
blockSize: {w:0,h:0},
width: 0,
height: 0,
elW:0,
elH:0,