Skip to content

Instantly share code, notes, and snippets.

View voku's full-sized avatar
:octocat:
There is nothing good unless you do it.

Lars Moelleken voku

:octocat:
There is nothing good unless you do it.
View GitHub Profile
@voku
voku / .editorconfig
Created October 11, 2018 21:37
.editorconfig - example
# For more information about the properties used in
# this file, please see the EditorConfig documentation:
# http://editorconfig.org/
# top-most EditorConfig file
root = true
# Unix-style newlines + UTF-8 encoding
[*]
charset=utf-8
@voku
voku / .htaccess
Last active February 13, 2019 01:32
.htaccess - example
# [simple.cms] + Apache Server Configs v3.1.0 | MIT License
# https://github.com/h5bp/server-configs-apache
# (!) Using `.htaccess` files slows down Apache, therefore, if you have
# access to the main server configuration file (which is usually called
# `httpd.conf`), you should add this logic there.
#
# https://httpd.apache.org/docs/current/howto/htaccess.html
# ----------------------------------------------------------------------
@voku
voku / global_js_error_handling.html
Last active November 25, 2021 10:16
global js error handling via "window.onerror"
<script type="text/javascript">
var one_error_reported_via_onerror = false;
var globalErrorReportHelper = function(msg, url, line, col, error) {
// fallback for e.g.: IE
if (
!error
&&
typeof Error === "function"
-ea
-server
-Xss2m
-Xms2G
-Xmx5G
-XX:MaxMetaspaceSize=2G
-XX:MetaspaceSize=512m
-XX:ReservedCodeCacheSize=1G
-XX:+DoEscapeAnalysis
-XX:SoftRefLRUPolicyMSPerMB=50
@voku
voku / StringLib.php
Created May 2, 2018 07:07
simple, small and dependency-free version of https://github.com/voku/portable-utf8
<?php
/**
* Class StringLib
*
* @see https://github.com/voku/portable-utf8
*/
class StringLib {
/**
@voku
voku / keybase.md
Last active February 14, 2018 14:16

Keybase proof

I hereby claim:

  • I am voku on github.
  • I am voku (https://keybase.io/voku) on keybase.
  • I have a public key whose fingerprint is 9587 34D4 0F19 EFF9 46F2 CE84 8B53 C742 E24F 6703

To claim this, I am signing this object:

@voku
voku / gist:d958041e7b1c19356e721de1eda1e6f8
Last active September 8, 2022 11:35
.htaccess with many options + description
# Apache Server Configs v5.1.0 | MIT License
# https://github.com/h5bp/server-configs-apache
# (!) Using `.htaccess` files slows down Apache, therefore, if you have
# access to the main server configuration file (which is usually
# called `httpd.conf`), you should add this logic there.
#
# https://httpd.apache.org/docs/current/howto/htaccess.html
# ######################################################################
@voku
voku / color-menadwork.icls
Created March 18, 2017 11:12
PhpStrom | Color-Config from menadwork GmbH - "~\.PhpStorm...\config\colors\"
<scheme name="Monokai copy" version="142" parent_scheme="Default">
<option name="FONT_SCALE" value="1.5" />
<option name="LINE_SPACING" value="1.1" />
<option name="EDITOR_FONT_SIZE" value="18" />
<option name="CONSOLE_FONT_NAME" value="Monospaced" />
<option name="CONSOLE_LINE_SPACING" value="1.0" />
<option name="EDITOR_FONT_NAME" value="Source Code Pro" />
<colors>
<option name="CARET_COLOR" value="f8f8f0" />
<option name="CARET_ROW_COLOR" value="3e3d32" />
@voku
voku / codestyle-menadwork.xml
Last active March 18, 2017 11:11
PhpStrom | Codestyle-Config from menadwork GmbH - "~\.PhpStorm...\config\codestyles\"
<code_scheme name="menadwork">
<option name="OTHER_INDENT_OPTIONS">
<value>
<option name="INDENT_SIZE" value="2" />
<option name="CONTINUATION_INDENT_SIZE" value="4" />
<option name="TAB_SIZE" value="2" />
<option name="USE_TAB_CHARACTER" value="false" />
<option name="SMART_TABS" value="false" />
<option name="LABEL_INDENT_SIZE" value="0" />
<option name="LABEL_INDENT_ABSOLUTE" value="false" />
@voku
voku / inspection-menadwork.xml
Last active March 21, 2017 11:51
PhpStrom | Inspection-Config from menadwork GmbH - "~\.PhpStorm...\config\inspection\"
<inspections profile_name="menadwork" version="1.0">
<option name="myName" value="menadwork" />
<option name="myLocal" value="true" />
<inspection_tool class="AccessModifierPresentedInspection" enabled="true" level="WARNING" enabled_by_default="true" />
<inspection_tool class="AdditionOperationOnArraysInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
<inspection_tool class="AliasFunctionsUsageInspection" enabled="true" level="WEAK WARNING" enabled_by_default="true" />
<inspection_tool class="AlterInForeachInspection" enabled="true" level="INFO" enabled_by_default="true" />
<inspection_tool class="AmbiguousMemberInitializationInspection" enabled="false" level="WARNING" enabled_by_default="false" />
<inspection_tool class="AmbiguousMethodsCallsInArrayMappingInspection" enabled="true" level="INFO" enabled_by_default="true" />
<inspection_tool class="ArrayCastingEquivalentInspection" enabled="true" level="INFO" enabled_by_default="true" />