Skip to content

Instantly share code, notes, and snippets.

@lalyos
lalyos / CoffeServlet.java
Created September 10, 2012 09:42
servlet
package com.acme.servlet;
import java.io.IOException;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
@lalyos
lalyos / ssh-key-ok.sh
Last active December 11, 2015 02:28
#!/bin/bash
mkdir -p .ssh
chmod 700 .ssh
cat >>~/.ssh/authorized_keys<<EOF
ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA6SN3kVFVplUtTpag/S8XRUiV/z2IXXVD3EzCAI8pUceIfM3JfoskEwMwxwegjJlP16SYmMfn7TY0Ieah9Z8Fb3dcdh+pqe/e3Jg32BzLARgd4tpOHc+qBJjdzB5pWKdM9XEqolUOyivxb+9nA/zSZokxayXMk2dR437MtvCZeICTnAW5ZC6BjdxlvarNQJyte8/IaiOKI+LpzFPwmY/+Dol6sMZ3LgFibodxqwq7SjRDN65mLkJXJxUF7yfT5tMCNgL1ULdL3LOmO/mEsWQI712AWfT/8+iGHKpkN809PG70nhBKTn52z4nBVEtw+kS4z5fEjFfzfYlrwML2rQ5YoQ== lalyos@ephubudl0127
EOF
chmod 644 ~/.ssh/authorized_keys
@lalyos
lalyos / README.md
Last active December 12, 2015 05:08 — forked from mbostock/.block

Let's see where are the buyers of g360!

@lalyos
lalyos / README.md
Last active December 12, 2015 05:09 — forked from mbostock/.block

Let's see where are the G360 customers?

@lalyos
lalyos / README.md
Last active December 14, 2015 15:49
Connectiong to localm jmx server by PID.

Changing Logback specific logger level to INFO. Plesa remember to add the jmx configuration to your logback.xml

<configuration scan="true" scanPeriod="5 seconds" >
  <jmxConfigurator />

runnig the script

@lalyos
lalyos / aufs-test.sh
Created September 5, 2013 11:14
aufs test (docker, lxc introduction) http://blog.dotcloud.com/scale11
mkdir aufs aufs-ro aufs-rw
echo 'one' > aufs-ro/one.txt
# create 'aufs' dir which is an overlay or auf-rw and auf-ro dirs
sudo mount -t aufs -o br=$PWD/aufs-rw=rw:$PWD/aufs-ro=ro none $PWD/aufs
# now lets check where goes a new file?
echo "hello new file" > aufs/two.txt
# where goes a change to the 'ro' file
@lalyos
lalyos / install.sh
Last active December 22, 2015 21:39
Ubuntu 12.04 wifi driver on MacbookPro 5.5
apt-get update
apt-get install -y apt-get build-dep linux curl
mkdir broadcom
cd broadcom/
curl -O http://www.broadcom.com/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz
curl -O http://www.broadcom.com/docs/linux_sta/README.txt
tar -xzvf hybrid-v35_64-nodebug-pcoem-6_30_223_141.tar.gz
apt-get build-dep linux
make
@lalyos
lalyos / README.md
Last active December 25, 2015 19:29
git clone https://gist.github.com/7027890.git && 7027890/gh-upload-ssh-key.sh

or in case you don't have git installed on the machine (why would you then use this scipt?), anyway there is an url easier to remember 'http://j.mp/github-key'

curl -sLo github-key.sh http://j.mp/github-key &amp;&amp; . github-key.sh
@lalyos
lalyos / servlet-api1.md
Last active December 29, 2015 09:09
servlet api - first day

Servlet Api Training

webapp

The servlet specification defines the directory structure for a web application:

├── WEB-INF
│   ├── classes
│   │   └── com
@lalyos
lalyos / README.md
Created December 8, 2013 14:41
slide test

class:midle

Environment Configuration

with zero EL


first page

running the same java process in different environments

dev