Skip to content

Instantly share code, notes, and snippets.

View domtra's full-sized avatar

Dominik Tränklein domtra

View GitHub Profile
# docker
wget -q -O - https://get.docker.io/gpg | apt-key add -
echo deb http://get.docker.io/ubuntu docker main > /etc/apt/sources.list.d/docker.list
apt-get update -qq; apt-get install -q -y --force-yes lxc-docker
# Add vagrant user to the docker group
usermod -a -G docker vagrant
# packer
apt-get install unzip
wget https://dl.bintray.com/mitchellh/packer/0.5.2_linux_amd64.zip
apt-get update
apt-get -y upgrade
apt-get -y install build-essential zlib1g-dev libreadline-dev libssl-dev libcurl4-openssl-dev
apt-get -y install git-core
# Install rbenv
git clone git://github.com/sstephenson/rbenv.git /usr/local/rbenv
# Add rbenv to the path:
echo '# rbenv setup' > /etc/profile.d/rbenv.sh
aaron
abacus
abandon
abandoned
abandoning
abandonment
abandons
abate
abatement
abba
@domtra
domtra / fieldGroup.json
Last active November 30, 2017 14:23
Flynt json schemas
{
"$schema": "http://json-schema.org/schema#",
"type": "object",
"definitions": {
"empty": {
"type": "string",
"maxLength": 0
},
"intOrEmpty": {
"oneOf": [
@domtra
domtra / .htaccess
Created November 7, 2019 08:48
CacheEnabler settings for flynt / bedrock
# BEGIN Cache Enabler
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
# set blog sub path
SetEnvIf Request_URI "^(.*)$" SUB_PATH=/app/cache/cache-enabler/
# set Cache Enabler path
SetEnvIf Request_URI "^(.*)$" CE_PATH=$1
@domtra
domtra / curl.sh
Created November 13, 2019 14:09
curl with timings
curl -k -w " time_namelookup: %{time_namelookup}\n\
time_connect: %{time_connect}\n\
time_appconnect: %{time_appconnect}\n\
time_pretransfer: %{time_pretransfer}\n\
time_redirect: %{time_redirect}\n\
time_starttransfer: %{time_starttransfer}\n\
----------\n\
time_total: %{time_total}\n" -o /dev/null -s "$URL"
@domtra
domtra / .htaccess
Created June 5, 2020 14:02
php error reporting
# supress php errors
php_flag display_startup_errors off
php_flag display_errors off
php_flag html_errors off
# enable PHP error logging
php_flag log_errors on
php_value error_log /home/path/public_html/domain/PHP_errors.log
# prevent access to PHP error log
<Files PHP_errors.log>
Order allow,deny
@domtra
domtra / .htaccess
Last active December 15, 2020 12:52
stripped down h5bp .htaccess
# Apache Server Configs v3.2.1 | MIT License
# https://github.com/h5bp/server-configs-apache
<IfModule mod_rewrite.c>
RewriteEngine on
# RewriteCond %{HTTP_HOST} !^$
# RewriteCond %{HTTP_HOST} !^www\. [NC]
# # RewriteCond %{HTTPS}s ^on(s)|
# # RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]

Mac Setup

  1. Install xcode command line tools

    xcode-select --install
  2. If you are on a M1 / Apple Silicon chip, install rosetta2

    /usr/sbin/softwareupdate --install-rosetta --agree-to-license

setup tapas

nodejs on am64

Unfortunately nodejs does not provide compiled binaries for all nodejs version on arm64 at the moment. And propably never will. Only starting with version 15, you can easily install nodejs on arm64 without having to got through a lenghty compilation.

Additionally, not all node modules support arm64. Especially node-sass does not have arm64 support as of now.

With rosetta, however, we can run most nodejs applications successfully.