# remove php5 modules
apt-get autoremove --purge php5-*
# add php-7.0 source list by [Ondřej Surý](https://github.com/oerdnj)
add-apt-repository ppa:ondrej/php
# Update index
apt-get update
# Install php7.0-fpm with needed extensions
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
// This will open up a prompt for text to send to a console session on digital ocean | |
// Useful for long passwords | |
(function () { | |
var t = prompt("Enter text to be sent to console, (This wont send the enter keystroke)").split(""); | |
function f() { | |
var character = t.shift(); | |
var i=[]; | |
var code = character.charCodeAt(); | |
var needs_shift = "!@#$%^&*()_+{}:\"<>?~|".indexOf(character) !== -1 |
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 | |
return function($site, $pages, $page) { | |
$alert = null; | |
if(get('submit')) { | |
$data = array( | |
'name' => get('name'), |
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
# block content | |
location ~ ^/content/(.*).(txt|md|mdown)$ { | |
rewrite ^/content/(.*).(txt|md|mdown)$ /error redirect; | |
} | |
# block all files in the site folder from being accessed directly | |
location ~ ^/site/(.*)$ { | |
rewrite ^/site/(.*)$ /error redirect; | |
} |
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 | |
/** | |
* Instructions: | |
* | |
* 1. Put this into the document root of your Kirby site | |
* 2. Make sure to setup the base url for your site correctly | |
* 3. Run this script with `php statify.php` or open it in your browser | |
* 4. Upload all files and folders from static to your server | |
* 5. Test your site |
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
############################## | |
## Kirby configuration | |
############################## | |
location /kirby/ { | |
include /etc/nginx/mime.types; | |
index index.php; | |
root /var/www/addons88/; | |
if (!-e $request_filename){ |
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/sh | |
wget -q http://www.startssl.com/certs/sub.class1.server.ca.pem -O /tmp/sub.class1.server.ca.pem; \ | |
openssl ocsp -CAfile /tmp/sub.class1.server.ca.pem -issuer /tmp/sub.class1.server.ca.pem \ | |
-url http://ocsp.startssl.com/sub/class1/server/ca -noverify -no_nonce \ | |
-header "HOST" "ocsp.startssl.com" -cert ${1} |
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 | |
# Created on 7/17/13 by Ryan Sechrest | |
# Deploys pushed branch from the origin repository to the web directory | |
if [[ (-n $1) && (-n $2) && (-n $3) ]]; then | |
# Set path to project directory | |
project_path="/var/www/domains/$2/$3" |
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 | |
s::start(); | |
function panelUser() { | |
$cookie = cookie::get('auth'); | |
if(!$cookie) return false; | |
$info = s::get($cookie); |
NewerOlder