//Add this to Your serviceprovider.php
Browser::macro('fillHidden', function ($name , $value) {
$this->script("document.getElementsByName('$name')[0].value = '$value'");
return $this;
});
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
read -p "Write the host name, eg. google:" HOST; | |
read -p "Write the 1st level domain name without starting dot (.), eg. com.au:" DOMAIN; | |
mkdir -p /var/www/$HOST.$DOMAIN/current/public | |
mkdir -p /var/www/$HOST.$DOMAIN/logs | |
mkdir -p /var/www/$HOST.$DOMAIN/ssl | |
mkdir /etc/nginx/sites-available/ | |
touch /etc/nginx/sites-available/$HOST.$DOMAIN |
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
# Run `artisan make:test` for all Controllers under `your app/Http/Controllers` folder. | |
# Created tests mirror their path under the `app` folder and are suffixed with "Test". | |
find app/Http/Controllers -type f -name '*Controller.php' -exec sh -c 'php artisan make:test $(dirname "${1:4}")/$(basename "$1" .php)Test' sh {} \; |
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
<li class="<%= self_or_other(message) %>"> | |
<div class="avatar"> | |
<img src="http://placehold.it/50x50" /> | |
</div> | |
<div class="chatboxmessagecontent"> | |
<p><%= message.body %></p> | |
<time datetime="<%= message.created_at %>" title="<%= message.created_at.strftime("%d %b %Y at %I:%M%p") %>"> | |
<%= message_interlocutor(message).name %> • <%= message.created_at.strftime("%H:%M %p") %> | |
</time> | |
</div> |
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
Trying to bootstrap Dokku on an OpenStack Mitaka instance doesn't work. The reason is that this command fails: | |
docker build -t gliderlabs/herokuish /var/lib/herokuish | |
The curl to an HTTPS URL times out. This is because of a change in Docker where it no longer uses the MTU from the host, as described here. | |
The fix I found is to then go in to where your $DOCKER_OPTS are passed in and add in the MTU of your OpenStack installation (from ifconfig, generally 1450 seems like the right value) using the format -mtu=1450. For example on Ubuntu 16.04 the file to edit is /lib/systemd/system/docker.service and it should look like this: | |
ExecStart=/usr/bin/dockerd -H fd:// -mtu=1450 | |
My proposed solution is to somehow pass $DOCKER_OPTS in to bootstrap.sh, that way we can also customise the --dns flag so it uses OpenStack's DNS servers not Google's. I don't know how you'd want to do this given that bootstrap.sh supports multiple distributions and each has a different way of configuring docker to start though. |
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
.dont-break-out { | |
/* These are technically the same, but use both */ | |
overflow-wrap: break-word; | |
word-wrap: break-word; | |
-ms-word-break: break-all; | |
/* This is the dangerous one in WebKit, as it breaks things wherever */ | |
word-break: break-all; | |
/* Instead use this non-standard one: */ |
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
// Ex. GoogleParser.getCity(place); -Where place is a google place object returned from autocomplete | |
var GoogleParser = { | |
getStreetNumber: function (place) { | |
var COMPONENT_TEMPLATE = {street_number: 'short_name'}, | |
streetNumber = this.getAddrComponent(place, COMPONENT_TEMPLATE); | |
return streetNumber; | |
}, |
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
a.item:after, button.item:after, .item[href] .item-content:after, .item[ng-click] .item-content:after { | |
display: -webkit-box; | |
display: -webkit-flex; | |
display: -moz-box; | |
display: -moz-flex; | |
display: -ms-flexbox; | |
display: flex; | |
-webkit-box-align: center; | |
-ms-flex-align: center; |
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
.m-xs { | |
margin: 5px; | |
} | |
.m-sm { | |
margin: 10px; | |
} | |
.m { | |
margin: 15px; | |
} |
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 | |
// app/start/global.php | |
/* | |
|-------------------------------------------------------------------------- | |
| Application Error Logger | |
|-------------------------------------------------------------------------- | |
| | |
| Here we will configure the error logger setup for the application which |