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
@props(['open' => false, 'title', 'trigger', 'content']) | |
<div x-data="{ | |
open: @js($open), | |
hide() { this.open = false }, | |
show() { this.open = true }, | |
whenOpen(func) { if (this.open) $nextTick(func) }, | |
}"> | |
<div | |
x-on:click="show()" |
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 | |
namespace Tests\Feature; | |
use App\Services\Addy\Models\AddressDetails; | |
use GuzzleHttp\Client; | |
use Tests\TestCase; | |
class AddyAddressLookupTest extends TestCase | |
{ |
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
import gulp from 'gulp'; | |
import sourcemaps from 'gulp-sourcemaps'; | |
import buffer from 'gulp-buffer'; | |
import uglify from 'gulp-uglify'; | |
import tap from 'gulp-tap'; | |
import browserify from 'browserify'; | |
import babel from 'babelify'; | |
gulp.task('build', () => { |
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
#!/bin/bash | |
apt-get -y update | |
# install the firewall | |
echo 'Installing UFW' | |
apt-get install -y ufw | |
echo 'Configuring UFW' | |
# disable IPv6 | |
# sed -i "s/IPV6=yes/IPV6=no/" /etc/default/ufw |
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
.response { | |
margin: 10px 0px; | |
padding:12px; | |
} | |
.response.success { | |
color: #4F8A10; | |
background-color: #DFF2BF; | |
} |
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
$(document).ready(function () { | |
$('#contactForm').on('submit', function(event) { | |
// stop form submitting | |
event.preventDefault(); | |
var form = $(this); | |
var button = form.find('button'); | |
var responseBox = $('.response', form); |
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
- vars: | |
# Extra vars from Rundeck for partition type | |
partition: "{{ partition }}" | |
# For 'nmctl ps' wrapper - Some deployment validation | |
number_of_tries: 5 | |
sleep_between_tries: 60 | |
hosts: "app-{{ partition }}[0]" # Canary |
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
/* | |
public function openPaymentPage(Request $request) { | |
$user_id = $request->json('user_id'); | |
// how to redirect post another server with paramters? | |
// i cant find any solution with googling.. | |
// is it possible? | |
return redirect()->to('http://myserver.com/testpost', compact('user_id')); |
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
#!/bin/bash | |
nginx=stable # use nginx=development for latest development version | |
add-apt-repository ppa:nginx/$nginx | |
apt-get update -y | |
apt-get install -y nginx | |
echo "Nginx Installed" |
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 | |
$usersWithComments = Cache::remember('users', $minutes, function() | |
{ | |
return App\users::with('comments')->get(); | |
}); | |
// or | |
$users = App\users::with('comments')->get(); |
NewerOlder