Skip to content

Instantly share code, notes, and snippets.

View ePirat's full-sized avatar

Marvin Scholz ePirat

View GitHub Profile
@ePirat
ePirat / article.md
Last active February 2, 2017 00:44
Häusliche Gewalt in „50 Shades of Grey“

Häusliche Gewalt in „50 Shades of Grey“

Dies ist eine Übersetzung des Artikels „Domestic Violence in 50 Shades of Grey

Am 12. Februar eröffnet Karen Ingala Smith in Zussamenarbeit mit Women's Aid „The Femicide Census: Profiles of Women Killed By Men“ auf einer Konferenz in London. Währenddessen finden sich weniger als 4 km entfernt die Fans zur UK Premiere von Fifty Shades of Grey zusammen, der Film-Adaption des sehr erfolgreichen Romans von EL James. Die beiden Veranstaltungen scheinen nichts miteinander gemeinsam. Doch für Betroffene, die mit häusliche Gewalt zu tun oder diese erlebt haben, sind die beiden Verstanltungen eine verstörende Gegenüberstellung von häuslicher Gewalt mit einer fiktionalen, romantisierten Version dieser, welche von der Gesellschaft akzeptiert wird.

@ePirat
ePirat / Parser.js
Created January 16, 2013 21:12
Link header parser (JavaScript)
var PageLinks = function(linkHeader) {
var ProfileRel = "https://tent.io/rels/profile";
var final = [];
var links = linkHeader.split(",");
if (links.length < 2)
links[0] = linkHeader;
for (link in links) {
link = links[link];
var segments = link.split(";");
if (segments.length < 2)
@ePirat
ePirat / newsfix.user.js
Created November 28, 2011 20:34
Fix clearing search bar when switching to Google News
// ==UserScript==
// @name Google News Query Save
// @namespace ePirat
// @description Fixes that you have to re-enter the search term when you click "News" link
// @include http*://google.com/*
// @include http*://google.ae/*
// @include http*://google.com.af/*
// @include http*://google.com.ag/*
// @include http*://google.off.ai/*
// @include http*://google.am/*
@ePirat
ePirat / watermark.php
Created November 16, 2011 21:26
Wasserzeichen (PHP)
<?php
function PlaceWatermark($file, $text, $xxx, $yyy, $op, $outdir) {
require_once('fpdf.php');
require_once('fpdi.php');
$name = uniqid();
$font_size = 5;
$ts=explode("\n",$text);
$width=0;
foreach ($ts as $k=>$string) {
$width=max($width,strlen($string));
@ePirat
ePirat / nowpaying.scpt
Created August 11, 2011 17:17
Crap Script © ePirat
-- by MacScripter User Nigel Garvey
on switchText(t, r, s)
set d to text item delimiters
set text item delimiters to s
set t to t's text items
set text item delimiters to r
tell t to set t to item 1 & ({""} & rest)
set text item delimiters to d
t
end switchText
@ePirat
ePirat / Test.scpt
Created August 8, 2011 10:42
AppleScript Fun
set txt to "line 1
line 2
Xeon3D 3
line 4"
set txtlist to paragraphs of txt
repeat with theLine in txtlist
if theLine contains "Xeon3D" then
return theLine as text
@ePirat
ePirat / help.md
Created February 27, 2015 14:56
Buy something on Steam while in another Country

Recently I had to buy something on Steam while in another Country. Turns out it was impossible, because the country information of my Payment method differs from the Country selected based on my IP Address. So I contacted the Steam support, and they advised me to pass a special Argument to the URL when visiting the Steam Store through a Webbrowser:

http://store.steampowered.com/?cc=<countrycode>

Replace <countrycode> with a 2 character country code, for example:

http://store.steampowered.com/?cc=DE

@ePirat
ePirat / parse_playlist.php
Last active August 29, 2015 14:16
Ice PlaylistParser
#!/usr/bin/php
<?php
if (php_sapi_name() == "cli") {
// If this is executed via CLI, parse options and stuff
// Helper
function report_error($e) {
// Get the current script name
$our_name = (($v =strrchr(__FILE__, DIRECTORY_SEPARATOR)) == FALSE)
? __FILE__
@ePirat
ePirat / keybase.md
Created February 25, 2015 08:33
keybase.md

Keybase proof

I hereby claim:

  • I am ePirat on github.
  • I am epirat (https://keybase.io/epirat) on keybase.
  • I have a public key whose fingerprint is 66DF 0B23 CE79 3C28 0922 62E1 3EBF 06BE 1FF9 645A

To claim this, I am signing this object:

@ePirat
ePirat / CodeStyle.md
Last active August 29, 2015 14:07
C Coding Style proposal for Icecast

C Coding Style

Proposal for Icecast

Formatting

Indent with (4) spaces, no tabs.
A Line Should Not Exceed 80 Characters.

Brace Placement

All if, while, for and do statements should either have braces or be on a single line. Do not put parens next to keywords. Put a space between.