This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-module(day1). | |
-export([count/1]). | |
-export([count10/0]). | |
-export([check/1]). | |
count([32| Rest]) -> count(Rest) + 1; | |
count([_| Rest]) -> count(Rest); | |
count([]) -> 1. | |
count10(10) -> 10; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# ~/Scripts/1024scale.sh | |
# change display settings to clone mode, 1024x768 pix for VGA (projector) and scales it to the resolution of 1024x600 of the internal display | |
xrandr --newmode "1024x768" 63.50 1024 1072 1176 1328 768 771 775 798 -hsync +vsync | |
xrandr --addmode VGA1 1024x768 | |
xrandr --fb 1024x768 | |
xrandr --fb 1024x768 --output LVDS1 --mode 1024x600 --scale 1x1.28 --panning 0x0 | |
xrandr --output VGA1 --same-as LVDS1 --mode 1024x768 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
import sys | |
import os | |
import subprocess | |
def usage(): | |
print "Usage:\n\n " + sys.argv[0] + " <vdi-File> <mount point>" | |
if len(sys.argv) < 3: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Kernel definition | |
__global__ void MatAdd(float A[N][N], float B[N][N], float C[N][N]) { | |
int i = blockIdx.x * blockDim.x + threadIdx.x; | |
int j = blockIdx.y * blockDim.y + threadIdx.y; | |
if (i < N && j < N) | |
C[i][j] = A[i][j] + B[i][j]; | |
} | |
int main() { | |
// Kernel invocation |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM node:10 | |
COPY hello.js / | |
CMD ["node", "/hello.js"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const person = { | |
first: "Nikola", | |
last: "Testa" | |
}; | |
const getFirstName = prop('first'); | |
const getLastName = prop('last'); | |
const whitespace = () => ' '; | |
const concatenateMultipleStrings = unapply(reduce(concat, '')) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
{ | |
"presets": [ | |
"es2015", | |
"stage-3" | |
], | |
"plugins": [ | |
"transform-runtime" | |
] | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM ubuntu:16.04 | |
MAINTAINER Michael Gerhaeuser <michael.gerhaeuser@gmail.com> | |
RUN mkdir /work | |
WORKDIR /work | |
VOLUME ["/work"] | |
RUN apt-get update | |
RUN apt-get install -y --no-install-recommends pdftk sudo |
NewerOlder