- Install dnsmasq:
brew install dnsmasq
cd $(brew --prefix); mkdir etc; echo 'address=/.test/127.0.0.1' > etc/dnsmasq.conf
sudo cp -v $(brew --prefix dnsmasq)/homebrew.mxcl.dnsmasq.plist /Library/LaunchDaemons
sudo launchctl load -w /Library/LaunchDaemons/homebrew.mxcl.dnsmasq.plist
sudo mkdir /etc/resolver
sudo bash -c 'echo "nameserver 127.0.0.1" > /etc/resolver/test'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Instructions for MacOS: | |
- Install the fonts 'Operator Mono' & 'Fira Code' | |
- Install theme 'Dark Candy' | |
- Add the following config to the VS Code settings.json: | |
{ | |
"editor.renderWhitespace": "all", | |
"editor.fontSize": 14, |
I hereby claim:
- I am mauricerenck on github.
- I am mauricerenck (https://keybase.io/mauricerenck) on keybase.
- I have a public key whose fingerprint is AD05 6F75 6CD7 4C99 B859 D232 C015 8BDF 436F CEF7
To claim this, I am signing this object:
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// This can be found in the Symfony\Component\HttpFoundation\Response class | |
const HTTP_CONTINUE = 100; | |
const HTTP_SWITCHING_PROTOCOLS = 101; | |
const HTTP_PROCESSING = 102; // RFC2518 | |
const HTTP_OK = 200; | |
const HTTP_CREATED = 201; | |
const HTTP_ACCEPTED = 202; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/ | |
// See also: http://www.paulund.co.uk/change-url-of-git-repository | |
$ cd $HOME/Code/repo-directory | |
$ git remote rename origin bitbucket | |
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git | |
$ git push origin master | |
$ git remote rm bitbucket |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$path = ltrim($path, "/"); | |
$path_elements = explode("/", $path); | |
$path_info = pathinfo($path); | |
$path_md5 = md5($path); | |
$path = array_slice(str_split($path_md5, 2), 0, 3); | |
$path = $path_elements[0]."/".$path_elements[1]."/".join("/", $path)."/".$path_info['basename']; | |
$path = '//'.$_SERVER['HTTP_HOST'].'/'.$path; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[https://gist.github.com/stephou0104/233b5c99884f1d8c8b8b#file-ubuntu-compass-ruby] | |
sudo apt-get update | |
sudo apt-get install git-core curl zlib1g-dev build-essential libssl-dev libreadline-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt1-dev libcurl4-openssl-dev python-software-properties | |
sudo apt-get install libgdbm-dev libncurses5-dev automake libtool bison libffi-dev | |
curl -L https://get.rvm.io | bash -s stable | |
gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 | |
source ~/.rvm/scripts/rvm | |
echo "source ~/.rvm/scripts/rvm" >> ~/.bashrc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* Usage example: | |
* $filteredPages = $page('projects')->children()->visible()->filterByStructure('structureField', array( | |
* 'field1' => $value, | |
* 'field2' => $value | |
* )); | |
*/ | |
pages::$methods['filterByStructure'] = function($pages, $field, $options) { | |
$filteredPages = $pages->filter(function($p)use($field, $options) { | |
$structureField = $p->$field()->yaml(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
define('FS_METHOD','direct'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="de"> | |
<head> | |
<meta charset="utf-8"> | |
<meta http-equiv="x-ua-compatible" content="ie=edge, chrome=1"> | |
<title></title> | |
<link href="assets/css/style.css" rel="stylesheet" media="screen"> | |
</head> | |
<body> |