This guide is based on the very informative discussion in this article: Using node_sqlite3 with Electron
Install sqlite3
npm install sqlite3 --save
| import { createCipheriv, createDecipheriv, randomBytes } from "crypto"; | |
| const ENCRYPTION_KEY: string = process.env.ENCRYPTION_KEY || ""; // Must be 256 bits (32 characters) | |
| const IV_LENGTH: number = 16; // For AES, this is always 16 | |
| /** | |
| * Will generate valid encryption keys for use | |
| * Not used in the code below, but generate one and store it in ENV for your own purposes | |
| */ | |
| export function keyGen() { |
| // Create Post Type for the In Person Assessment Logging | |
| function psgp_in_person_assessments_create_post_type() { | |
| /* Set up the arguments for the post type. */ | |
| $args = array( | |
| /** | |
| * A short description of what your post type is. As far as I know, this isn't used anywhere | |
| * in core WordPress. However, themes may choose to display this on post type archives. |
| load_balancer: | |
| image: tutum/haproxy | |
| links: | |
| - web | |
| ports: | |
| - "80:80" | |
| cache: | |
| image: redis |
This guide is based on the very informative discussion in this article: Using node_sqlite3 with Electron
Install sqlite3
npm install sqlite3 --save
| using FullSerializer; | |
| using System; | |
| using System.IO; | |
| using System.Runtime.Serialization.Formatters.Binary; | |
| public static class DataSerializer | |
| { | |
| private static readonly fsSerializer serializer = new fsSerializer(); | |
| public static string Serialize<T>(object value, bool prettify = false) |
| <?php | |
| /* | |
| * PHP: Recursively Backup Files & Folders to ZIP-File | |
| * (c) 2012-2014: Marvin Menzerath - http://menzerath.eu | |
| * contribution: Drew Toddsby | |
| */ | |
| // Make sure the script can handle large folders/files | |
| ini_set('max_execution_time', 600); | |
| ini_set('memory_limit','1024M'); |
export LANGUAGE="en_US.UTF-8"
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
locale-gen en_US.UTF-8
dpkg-reconfigure locales
apt-get install unzip libpcre3 libpcre3-dev libssl-dev libpcrecpp0 zlib1g-dev debhelper dh-systemd libgeoip-dev autotools-dev libgd2-noxpm-dev libluajit-5.1-dev libmhash-dev libpam0g-dev libperl-dev po-debconf libexpat-dev libxslt1-dev| --[[ | |
| lua_php_utils.lua | |
| @author karminski <code.karminski@outlook.com> | |
| @version 140319:1 | |
| @changelog | |
| 140319:1 ADD scandir(), file_exists(), is_numeric(), trim(), round(), count(), empty(), | |
| explode(), implode(), print_r(), strrpos(), strpos(), split(), urlencode(), |
| -- a quick LUA access script for nginx to check IP addresses against an | |
| -- `ip_blacklist` set in Redis, and if a match is found send a HTTP 403. | |
| -- | |
| -- allows for a common blacklist to be shared between a bunch of nginx | |
| -- web servers using a remote redis instance. lookups are cached for a | |
| -- configurable period of time. | |
| -- | |
| -- block an ip: | |
| -- redis-cli SADD ip_blacklist 10.1.1.1 | |
| -- remove an ip: |
| - certain endpoints are always blocked | |
| if nginx_uri == "/_access_token" or nginx_uri == "/_me" then | |
| ngx.exit(403) | |
| end | |
| -- import requirements | |
| local cjson = require "cjson" | |
| -- setup some app-level vars | |
| local app_id = "APP_ID" |