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
# Build with: | |
# docker build -t <projectname> . | |
# Run with windows, untested: | |
# docker run --rm -it -v %cd%:/data -v /data/webpack/node_modules -p 5000:5000 -it <projectname> lektor server -f webpack --host 0.0.0.0 | |
# Run on Uunix: | |
# docker run --rm -it -v $(pwd):/data -v /data/webpack/node_modules -p 5000:5000 -it <projectname> lektor server -f webpack --host 0.0.0.0 | |
FROM python:3.6.1 |
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
models/myattachment.ini: | |
---------------------- | |
[model] | |
name = MyAttachment | |
label = MyAttachment | |
hidden = no | |
[fields.description] | |
label = Description | |
type = string |
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
lektor deploy --username xxxxxx --password xxxxxx | |
/Users/uk/.virtualenvs/xxxxxx/bin/../lib/python3.6/site.py:165: DeprecationWarning: 'U' mode is deprecated | |
f = open(fullname, "rU") | |
Deploying to production | |
Build cache: /Users/uk/Library/Caches/Lektor/builds/ac23d873bd37ecb20fdd544088809b91 | |
Target: ftps://xxxxxx/ | |
000 Connecting to server ... | |
220---------- Welcome to Pure-FTPd [privsep] [TLS] ---------- | |
220-You are user number 1 of 50 allowed. | |
220-Local time is now 00:23. Server port: 21. |
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/sh | |
for i in `cowsay -l | tail -n +2` | |
do | |
echo $i | |
cowsay -f $i "Ich bin die Kuh" | |
sleep 3 | |
done |
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 pydub import AudioSegment | |
sound1 = AudioSegment.from_file("loop.wav") | |
kick = AudioSegment.from_file("kick.wav") | |
snare = AudioSegment.from_file("snare.wav") | |
ms = len(sound1)//4 | |
beat = AudioSegment.silent(duration=ms).overlay(kick).overlay(snare, position=ms//2) * 4 | |
combined = (sound1.overlay(beat) * 4).fade_in(1000).fade_out(1000) |
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
DRACHI = """ | |
+---------------------+ | |
| D A N K E S C H Ö N | / \ //\\ | |
+------------|\___/|--+ / \// .\\ | |
\ /O O \__ / // | \ \\ | |
\ / / \/_/ // | \ \\ | |
@___@' \/_ // | \ \\ | |
| \/_ // | \ \\ | |
| \/// | \ \\ | |
_|_ / ) // | \ _\\ |
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 python2.7 | |
# -*- coding: utf-8 -*- | |
import socket | |
import colorsys # for HSV-to-RGB-conversion | |
UDP_IP = "10.0.0.200" | |
UDP_PORT = 1337 | |
ROWS = 16 |
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/python | |
import os, sys | |
import xml.etree.ElementTree as ET | |
tree = ET.parse("filename.kml") | |
places = list(tree.iter('{http://earth.google.com/kml/2.0}Placemark')) | |
print '"name", "longitude", "latidude", "elevation"' |
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
/* | |
Fade for c-info wall at c-base | |
*/ | |
#include <SPI.h> | |
#include <Ethernet.h> | |
#include <PubSubClient.h> | |
// Apparently the preprocessor variables B0 and B1 are already taken. | |
// Therefore we use the prefix CBASE |
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
/** | |
* Plasma-Leitungs-Code für die c-base | |
*/ | |
// most launchpads have a red LED | |
#define LED1 P1_7 | |
#define LED2 P1_6 | |
#define LED3 P2_5 | |
#define LED4 P2_4 | |
#define LED5 P2_3 |
NewerOlder