Skip to content

Instantly share code, notes, and snippets.

View juliankoehn's full-sized avatar
:octocat:
I may be slow to respond.

Julian Köhn juliankoehn

:octocat:
I may be slow to respond.
View GitHub Profile
# From a fresh install of squeeze
apt-get install ruby rubygems # Need ruby to use fpm
gem1.8 install fpm --no-ri --no-rdoc
apt-get install build-essential openssl libreadline6 libreadline6-dev zlib1g zlib1g-dev libssl-dev ncurses-dev libyaml-dev
wget ftp://ftp.ruby-lang.org/pub/ruby/1.9/ruby-1.9.3-p125.tar.gz
tar -zxvf ruby-1.9.3-p125.tar.gz
cd ruby-1.9.3-p125
rm -rf /tmp/ruby193
@juliankoehn
juliankoehn / Go2Top.html
Last active October 21, 2015 14:27
Go2Top Element
<div class="go2top">
<i class="fa fa-arrow-up"></i>
</div>
@juliankoehn
juliankoehn / header.html
Last active October 21, 2015 17:26
Sticky Header for maxGOLDs #1 Theme
<!-- Header -->
<header class="header" data-minimize-offset="80">
<div class="upperHeader">
<div class="container">
<div class="row">
<div class="col-xs-12 col-lg-6">
<p>Welcome to maxGOLDs, <a href="#">Login</a> or <a href="#">Create a new account</a></p>
</div>
<div class="col-xs-12 col-lg-6">
<ul class="pull-right inline text-right">
@juliankoehn
juliankoehn / FIFA16_headers
Last active October 23, 2015 00:50
User Agent
# chrome 45 @ win10
headers = {
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/45.0.2454.101 Safari/537.36',
'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8',
'Accept-Encoding': 'gzip,deflate,sdch',
'Accept-Language': 'en-US,en;q=0.8',
# 'Accept-Charset': 'utf-8, iso-8859-1, utf-16, *;q=0.1',
'Connection': 'keep-alive',
# 'Keep-Alive': '300',
'DNT': '1',
<?php
namespace App\Http\Utilities;
class WarcraftRealms
{
protected static $realms_eu = [
"Aegwynn" => "German",
"Aerie Peak" => "English",
"Agamaggan" => "English",
@juliankoehn
juliankoehn / local.xml
Created July 5, 2018 06:15 — forked from anthuanvasquez/local.xml
Remove default blocks from Magento 1.9 using local.xml
<?xml version="1.0"?>
<layout>
<default>
<!--Root/Default Layouts-->
<reference name="root">
<!--Appending Block-->
<block type="page/html_breadcrumbs" name="breadcrumbs" as="breadcrumbs"/>
</reference>
<!--CSS and JS Files-->
@juliankoehn
juliankoehn / nginx.conf
Created January 18, 2019 04:38 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@juliankoehn
juliankoehn / convertToUtf8.php
Created May 5, 2019 06:55
Simple UTF8 Converter Function (used for JTL -> Laravel (Latin1 to UTF8)
<?php
public function convertToUtf8 ($el) {
if (is_array($el)) {
foreach ($el as $key => $value) {
if (is_array($el[$key])) {
$el[$key] = $this->convertToUtf8($value);
} else {
$el[$key] = utf8_encode($value);
}
@juliankoehn
juliankoehn / restcountries.eu
Last active September 6, 2019 18:06
all countries, currency, tld etc
[{
"name": "Afghanistan",
"topLevelDomain": [".af"],
"alpha2Code": "AF",
"alpha3Code": "AFG",
"callingCodes": ["93"],
"capital": "Kabul",
"altSpellings": ["AF", "Afġānistān"],
"region": "Asia",
"subregion": "Southern Asia",
@juliankoehn
juliankoehn / creditcard.go
Created March 25, 2020 16:06
Credit Card structs for stripe.com
// Creditcard a creditcard holds information
// about a card from StripeJS
// card brand
type Creditcard struct {
ID string `json:"id" db:"id"`
// Can be amex, diners, discover, jcb, mastercard, unionpay, visa, or unknown
Brand string `json:"brand" db:"brand"`
Checks Checks `json:"checks" has_one:"checks" fk_id:"credit_card_id"`
Country string `json:"country" db:"country"`
// Two-digit number representing the card’s expiration month.