uname -a # Display Linux System Information
uname -r # Display kernel release information
uptime # Show how long the system has been running + load
hostname # Show system host name
hostname -i # Display the IP address of the host
last reboot # Show system reboot history
date # Show the current date and time
🏴☠️
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
; if you're using the starter bundle file `docker/php/php-fpm.d/docker.conf` | |
[global] | |
daemonize = no | |
pid = run/php-fpm.pid | |
[www] | |
listen = /usr/local/var/run/php-fpm.sock | |
listen.owner = www-data | |
listen.group = www-data | |
listen.mode = 0660 |
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
function itemsSort(items) { | |
// Write your code here | |
const countObj = items.reduce((rlt, val) => { | |
if (val in rlt) { | |
rlt[val]++ | |
} else { | |
rlt[val] = 1 | |
} | |
return rlt; | |
}, {}) |
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 App\Http\Middleware; | |
use Closure; | |
use Illuminate\Http\Response; | |
/** | |
* Validate Mailgun Webhooks | |
* @see https://documentation.mailgun.com/user_manual.html#securing-webhooks |
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 App; | |
use Carbon\Carbon; | |
use Psr\Http\Message\RequestInterface; | |
class HMACRequestHandler | |
{ | |
private $key; |
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
var sys = require('sys'), | |
spawn = require('child_process').spawn, | |
// args from command line | |
filename, servers; | |
if (process.ARGV.length < 4) { | |
return sys.puts("Usage: node remote-tail.js filename server1 [serverN]"); | |
} |
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
# Must run from the root of a Laravel app | |
alias clearlog="truncate -s 0 $PWD/storage/logs/laravel.log" | |
alias clearlogs="truncate -s 0 $PWD/storage/logs/*.log" | |
# Or using git rev-parse | |
alias clearlog="truncate -s 0 $(git rev-parse --show-toplevel)/storage/logs/laravel.log" | |
alias clearlogs="truncate -s 0 $(git rev-parse --show-toplevel)/storage/logs/*.log" |
├── .gitignore
├── manuscript
│ ├── Book.txt
│ ├── Sample.txt
│ ├── Subset.txt
│ ├── acknowledgments.md
│ ├── backmatter.txt
│ ├── chapter01.md
│ ├── chapter02.md
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 dateMixin from './mixins/date'; | |
// Globally | |
Vue.mixin(dateMixin); |
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
0.0.0.0 | |
root /srv/app/public | |
gzip | |
fastcgi / 127.0.0.1:9000 php | |
rewrite { | |
regexp .* | |
ext / | |
to /index.php?{query} | |
} |
NewerOlder