Skip to content

Instantly share code, notes, and snippets.

View skoop's full-sized avatar
💭
Developing

Stefan Koopmanschap skoop

💭
Developing
View GitHub Profile
@skoop
skoop / dj
Created October 17, 2015 13:26
<div class="grid_3">
<div class="event">
<img src="{{ thumbnail(dj.image, 270, 170) }}" alt="{{ dj.name }}"/>
<h6 class="color_2">
<a href="{{ dj.link }}">{{ dj.name }}</a>
</h6>
<p>{{ dj.teaser }}</p>
</div>
</div>
{% for dj in records %}
// snippet
{% endfor %}
{% setcontent latestnews = 'nieuwsberichten/latest/5' %}
{% for news in latestnews %}
// the content to display the newsitem here
{% endfor %}
@skoop
skoop / default.pp
Created May 14, 2013 15:26
Default.pp
exec { 'apt-get update' :
command => 'apt-get update',
path => '/usr/bin/',
timeout => 60,
tries => 3
}
class { 'apt' :
always_apt_update => true
}
@skoop
skoop / Vagrantfile
Created May 14, 2013 15:25
Vagrantfile
Vagrant.configure("2") do |config|
config.vm.box = "precise64"
config.vm.box_url = "http://files.vagrantup.com/precise64.box"
config.vm.network :private_network, ip: "192.168.56.101"
config.ssh.forward_agent = true
config.vm.provider :virtualbox do |v|
v.customize ["modifyvm", :id, "--natdnshostresolver1", "on"]
@skoop
skoop / gist:7317218
Created November 5, 2013 10:49
converting BLOB to text in SQL
select CONVERT(Text USING utf8) as description FROM Book where EAN='${bookproduct.id}'
@skoop
skoop / firstattempt.kt
Created November 25, 2017 10:25
My first attempt at doing the 99 bottles code kata in Kotlin
package org.domcode.kata
fun main(args: Array<String>) {
for (i in 0..99) {
val bottleAmount: Int = getAmount(i)
val oneLess: Int = subtractOne(bottleAmount)
if (bottleAmount > 1) {
println("$bottleAmount bottles of beer on the wall, $bottleAmount bottles of beer.")
if (oneLess == 1) {
println("Take one down, pass it around, $oneLess bottle of beer on the wall.")
@skoop
skoop / secondattempt.kt
Created November 25, 2017 10:26
Second attempt at doing the 99 bottles code kata with Kotlin
package org.domcode.kata
fun main(args: Array<String>) {
for (i in 0..99) {
val bottleAmount: Int = getAmount(i)
val oneLess: Int = subtractOne(bottleAmount)
when {
bottleAmount > 1 -> println("$bottleAmount bottles of beer on the wall, $bottleAmount bottles of beer.")
bottleAmount == 1 -> println("$bottleAmount bottle of beer on the wall, $bottleAmount bottle of beer.")
@skoop
skoop / file1.txt
Created November 25, 2017 12:10
Kata 2: parse old print files
_ _ _ _ _ _ _
| _| _||_||_ |_ ||_||_|
||_ _| | _||_| ||_| _|
_ _ _ _ _ _ _ _ _
| || || || || || || || || |
|_||_||_||_||_||_||_||_||_|
_ _ _ _ _ _ _ _ _
_| _| _| _| _| _| _| _| _|