Skip to content

Instantly share code, notes, and snippets.

Docker

Docker-enabled environment

Cloud

ssh -i workshop.pem [email protected]

Replace 01 in lxc-1-01 with index assigned to you. Download workshop key below.

@arkadijs
arkadijs / install.md
Last active January 6, 2022 17:10
GitLab in LXC on Ubuntu and openSUSE

Ubuntu host and container

Install LXC:

apt-get install linux-hwe-generic # update to 3.13 on Precise
apt-add-repository ppa:ubuntu-lxc/stable
apt-get update
apt-get install lxc lxc-templates cgmanager cgroup-lite
reboot
@arkadijs
arkadijs / compute.groovy
Last active August 29, 2015 14:05
Authentication to Google Compute Engine example
// compile 'com.github.groovy-wslite:groovy-wslite:1.1.0'
// compile 'com.google.apis:google-api-services-compute:v1-rev29-1.19.0'
// compile 'com.google.http-client:google-http-client-jackson2:1.19.0'
// compile 'com.google.oauth-client:google-oauth-client-jetty:1.19.0'
import com.google.api.services.compute.Compute
import com.google.api.services.compute.model.*
import wslite.rest.ContentType
import wslite.http.HTTPClient
import wslite.rest.RESTClient
java ee (v1.4, and partly 5) cf / bosh
(proprietary) deployment descriptor bosh manifest
xml yaml
ear(-s) bosh release
ee app server, "fits all purposes" cloudfoundry elastic runtime
transparent clustering, availability multi-az deployment, resurrector
statefull stateless

j2ee ship sunk ~9 years ago.

@arkadijs
arkadijs / _README.md
Last active January 9, 2021 14:21
Workshop: Deploying WordPress on Google App Engine :: PHP and Cloud SQL http://ldn.lv/events/166755872 http://goo.gl/F5K4Qn

Google Cloud SDK

There are two alternatives to start with the SDK:

  1. install SDK locally;
  2. use provided Linux VM in the cloud via ssh.

Note: everyone will get a separate index, ie. hacker02, hacker03, etc.

$ ssh [email protected]

@arkadijs
arkadijs / _README.md
Last active August 29, 2015 13:57
Hackathon: Write your own dynamic language today - with PyPy http://ldn.lv/events/141429062 http://goo.gl/rdS0dz

PyPy environment

Download and build PyPy as described here. It will take about 1 hour of modern machine time. The pre-built PyPy archive does not have all the stuff we need.

Instead, I supply you with a powerful Linux VM in case you choose to work in the cloud:

$ ssh [email protected]

pypy binary is in your PATH. And PYPY env var is also set to the path of unpacked and already built PyPy sources.

@arkadijs
arkadijs / params.rb
Created February 20, 2014 10:43
How to write this nicely?
def f(params)
puts params
end
opt = {}
opt[:config] = 1
f (:p1 => 'x', :p2 => ( [{ :r => 'const', :t => opt[:config] }] if opt[:config] ))
# {:p1=>"x", :p2=>[{:r=>"const", :t=>1}]}
object Main {
def main(args: Array[String]) {
val date = new Deserializer().deserialize[java.util.Date]("2014-02-15")
val ints = new Deserializer().deserialize2[Int]("[1, 2, 3]")
}
}
class Deserializer {
import scala.reflect.{ ClassTag, Manifest }
@arkadijs
arkadijs / Week1.md
Last active January 4, 2016 09:39
Groovy Grails life

The Origin

I'm here not to teach you - see me as a guiding friend, a facilitator. We'll go together through a journey of getting better at some particular, non-hype, well understood yet sometimes problematic, still modern technology for developing web- and service-oriented applications. Hopefully it will give you a new perspective on how such things could be built.

It's up to you to choose what it'll be for you - an epic or a walk in the park. Most of the value will be to stay till the end, though.

To do the homework I expect about 5 hours of commitment per week -- similar to [Coursera]. Some colleagues already demonstrated that it could be done. But, compared to consuming nicely prepared material, we're on raw side this time -- you'll be setting your own tactical learning plan and digging for materials instead.

Last but not least, my opinion and judgments are always subjective.

@arkadijs
arkadijs / gameoflife1.py
Created December 24, 2013 22:52
Coderetreat: Java 8 vs Scala http://ldn.lv/events/138303652/ (Python quietly sneaks in)
import time
def cell_transition(alive, neighbour_count):
return neighbour_count in (2, 3) if alive else neighbour_count == 3
class RectField(object):
def __init__(self, size, cells):
self.size = size