-
Make a droplet using LAMP Instance
-
Add a new user (i.e. deployer)
adduser deployer
-
Add the new user to sudo group
This file contains hidden or 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
(# comment ) | |
(/\*(?:(?!\*/)[\s\S])*\*/) | |
(/\*(?:[^*]|\*[^/])*\*/) | |
(# @keyframes-rule ) | |
(@(?:-webkit-|-moz-)?keyframes(?:[\s\n]|/\*(?:(?!\*/)[\s\S])*\*/)+[a-zA-Z0-9_\-]+(?:[\s\n]|/\*(?:(?!\*/)[\s\S])*\*/)*{(?:[\s\n]|/\*(?:(?!\*/)[\s\S])*\*/)*(?:(?:from|to|[0-9]{1,3}%)(?:[\s\n]|/\*(?:(?!\*/)[\s\S])*\*/)*{(?:[^{}"']|/\*(?:(?!\*/)[\s\S])*\*/|'[^']*'|"[^"]*")*}(?:[\s\n]|/\*(?:(?!\*/)[\s\S])*\*/)*)+(?:[\s\n]|/\*(?:(?!\*/)[\s\S])*\*/)*}) | |
(# ruleset ) | |
((?:[^{}"']|'[^']*'|"[^"]*")+(?:[\s\n]|/\*(?:(?!\*/)[\s\S])*\*/)*{(?:[^{}"']|/\*(?:(?!\*/)[\s\S])*\*/|'[^']*'|"[^"]*")*}) |
This file contains hidden or 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 | |
function get_adjacent_post_basic ($direction = 'prev', $date = '') { | |
global $wpdb, $post; | |
if( empty( $date ) ) | |
$date = $post->post_date; | |
$operator = $direction == 'prev' ? '<' : '>'; | |
$order = $direction == 'prev' ? 'DESC' : 'ASC'; |
This file contains hidden or 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 | |
add_action('acf/init', 'register_post_fields'); | |
function register_post_fields () { | |
$location = [ | |
[ | |
[ | |
'param' => 'post_type', | |
'operator' => '==', |
This file contains hidden or 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 html = require('choo/html') | |
var choo = require('choo') | |
var app = choo() | |
app.route(mainView) | |
app.mount('body') | |
function mainView () { | |
return html`<body>hello world</body>` | |
} |
This file contains hidden or 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 byo = require('byo') | |
var preact = require('preact') | |
var hyperx = require('hyperx') | |
exports.framework = function () { | |
return byo({ | |
mount: function (tree, root) { | |
return preact.render(tree, root) | |
}, | |
render: function (tree, newTree, root) { |
This file contains hidden or 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
// can pipe stdout into autoprefixer, minifier, etc etc etc | |
node design.js > dist/bundle.css |
This file contains hidden or 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 Inferno = require('inferno') | |
var hyperx = require('hyperx') | |
var html = hyperx(require('inferno-create-element')) | |
function infernoRenderer (state, emit, renderer) { | |
renderer.render = function (tree, newTree, root) { | |
return Inferno.render(newTree, root) | |
} | |
renderer.mount = function (tree, root) { | |
return Inferno.render(tree, root) |
This file contains hidden or 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 { h, Component } = preact; | |
var hx = hyperx( (tag, props, kids) => h(tag, props, ...kids) ); | |
var App = () => hx` | |
<div id="app"> | |
${h(Demo)} | |
</div> | |
`; |
This file contains hidden or 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 | |
function route($pattern, $controller) | |
{ | |
return function($query) use($pattern, $controller) { | |
return (($matches = route_match($pattern, $query)) === false) ? | |
false : | |
function($registry) use($matches, $controller) { | |
return $controller($matches, $registry); | |
} | |
; |