Skip to content

Instantly share code, notes, and snippets.

View rotespferd's full-sized avatar
👨‍🍳

Marian Hahne rotespferd

👨‍🍳
View GitHub Profile
@rotespferd
rotespferd / install-php.sh
Last active May 16, 2024 15:47
Install PHP via asdf on Fedora
sudo dnf install -y autoconf bison bison-devel \
re2c libxml2 libxml2-devel openssl-devel \
sqlite sqlite-devel libcurl libcurl-devel \
gd gd-devel oniguruma oniguruma-devel \
libpq libpq-devel postgresql \
readline readline-devel libzip libzip-devel
asdf install php 8.3.7
asdf global php 8.3.7
@rotespferd
rotespferd / download-nyt-cover.ts
Created April 10, 2022 18:47
Download todays cover of the New York Times
import { format } from "https://deno.land/std@0.134.0/datetime/mod.ts";
const download = async (url: string, filename: string) => {
const data = (await fetch(url)).arrayBuffer();
return Deno.writeFile(filename, new Uint8Array(await data));
};
const outputDir = Deno.args[0];
const date = new Date();
const outputFile = `${outputDir}/nyt_cover_${format(date, "yyyy-MM-dd")}.pdf`;
@rotespferd
rotespferd / convert_nicknames.py
Last active April 10, 2021 16:36
Convert OOTP team_nick_names.txt to XML
from xml.dom import minidom
import os
txtFile = open("./team_nick_names.txt", "r")
nicknameLines = txtFile.readlines()
root = minidom.Document()
root.encoding = "utf-8"
@rotespferd
rotespferd / base16-eighties.dark.icls
Created January 18, 2016 16:32
Base 16 - Eighties Dark (for Phpstorm)
<scheme name="Base16-Eighties-Dark" version="142" parent_scheme="Default">
<option name="LINE_SPACING" value="1.1" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="CONSOLE_FONT_NAME" value="Menlo" />
<option name="CONSOLE_LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_NAME" value="Source Code Pro" />
<colors>
<option name="ADDED_LINES_COLOR" value="99cc99" />
<option name="ANNOTATIONS_COLOR" value="515151" />
<option name="CARET_COLOR" value="e8e6df" />
@rotespferd
rotespferd / .gitignore
Created January 22, 2015 15:25
TYPO3.gitignore
.DS_Store
## TYPO3 v4
# Ignore serveral upload and file directories.
/fileadmin/user_upload/
/fileadmin/_temp_/
/uploads/
# Ignore cache
/typo3conf/temp_CACHED*
/typo3conf/temp_fieldInfo.php
# Ignore local config which overrides typo3 config.
@rotespferd
rotespferd / install.sh
Last active August 29, 2015 13:56
Installation of a bootstrap TYPO3-project.
#!/bin/sh
echo "=================================="
echo "Welcome to TYPO3 project-bootstrapping."
echo "=================================="
mkdir cms
echo "Clone TYPO3 repositry"
git clone https://github.com/TYPO3/TYPO3.CMS.git typo3_src
@rotespferd
rotespferd / install-phalcon.sh
Created October 25, 2013 16:01
Installs the PHP framework Phalcon on Ubuntu.
#!/bin/sh
# install script for PHP framework Phalcon
# for more info see http://docs.phalconphp.com/en/latest/reference/install.html#linux-solaris-mac
echo "-------------------"
echo "Install Phalcon PHP"
echo "-------------------"
# installation prerequirements
@rotespferd
rotespferd / xcf2png
Created May 10, 2013 21:18
Converts all images in a directory from .xcf to .png.
#!/usr/local/bin/node
var fs = require('fs');
var sys = require('sys');
var exec = require('child_process').exec;
console.log("Start converting");
var command = "convert -flatten ";
@rotespferd
rotespferd / Smyck.xml
Created February 24, 2013 16:56
The smyck-color-theme for all JetBrains-Editors.
<scheme name="Smyck" parent_scheme="Default" version="1">
<option name="LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_SIZE" value="12" />
<option name="EDITOR_FONT_NAME" value="Menlo" />
<colors>
<option name="CONSOLE_BACKGROUND_KEY" value="1B1B1B" />
<option name="INDENT_GUIDE" value="444a50" />
<option name="SELECTION_BACKGROUND" value="1c5665" />
<option name="CARET_ROW_COLOR" value="323232" />
<option name="WHITESPACES" value="444a50" />
@rotespferd
rotespferd / grunt.js
Created November 24, 2012 15:56
A basic template gruntconfig file for grunt.js
/*global module:false*/
module.exports = function(grunt) {
// Project configuration.
grunt.initConfig({
pkg: '<json:package.json>',
meta: {
banner: '/*! <%= pkg.title || pkg.name %> - v<%= pkg.version %> - ' +
'<%= grunt.template.today("yyyy-mm-dd") %>\n' +
'<%= pkg.homepage ? "* " + pkg.homepage + "\n" : "" %>' +