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 weasyprint import HTML, CSS | |
class PdfGenerator: | |
""" | |
Generate a PDF out of a rendered template, with the possibility to integrate nicely | |
a header and a footer if provided. | |
Notes: | |
------ |
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
struct MediaItem { | |
var duration: Int? | |
var title: String? | |
var urlString: String? | |
static func parseM3U(contentsOfFile: String) -> [MediaItem]? { | |
var mediaItems = [MediaItem]() | |
contentsOfFile.enumerateLines({ line, stop in | |
if line.hasPrefix("#EXTINF:") { | |
let infoLine = line.stringByReplacingOccurrencesOfString("#EXTINF:", withString: "") |
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
sudo mkdir /etc/racoon/remote | |
sudo mv /var/run/racoon/*.conf /etc/racoon/remote | |
sudo sed -i.bak 's/lifetime time 3600 sec/lifetime time 168 hours/' /etc/racoon/remote/*.conf | |
sudo patch /etc/racoon/racoon.conf <<EOF | |
--- /etc/racoon.orig/racoon.conf 2009-06-23 09:09:08.000000000 +0200 | |
+++ /etc/racoon/racoon.conf 2009-12-11 13:52:11.000000000 +0100 | |
@@ -135,4 +135,5 @@ | |
# by including all files matching /var/run/racoon/*.conf | |
# This line should be added at the end of the racoon.conf file | |
# so that settings such as timer values will be appropriately applied. |
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 | |
########################################################################### | |
# Choose your ffmpeg version and your currently-installed iOS SDK version: | |
# | |
VERSION="2.0.2" | |
SDKVERSION="7.0" | |
ARCHS="armv7 armv7s i386" | |
# | |
# |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<title>WebSocket Client</title> | |
<style> | |
#output { | |
border: solid 1px #000; | |
} | |
</style> | |
</head> |