ARG IMAGE_REPO | |
FROM ${IMAGE_REPO:-lagoon}/commons as commons | |
FROM composer:latest as healthcheckbuilder | |
RUN composer create-project --no-dev amazeeio/healthz-php /healthz-php v0.0.6 | |
FROM php:8.0.0RC5-fpm-alpine3.12 | |
LABEL maintainer="amazee.io" |
// ==UserScript== | |
// @name Mediablock | |
// @description Closes social media from 7 AM to 6 PM inclusive on weekdays, 6 AM to 10 AM Saturdays, and completely free on Sundays! | |
// @include https://*.reddit.com | |
// @include https://*.reddit.com/* | |
// @include https://*.facebook.com | |
// @include https://*.facebook.com/* | |
// @include https://*.twitter.com | |
// @include https://*.twitter.com/* | |
// @include https://scratch.mit.edu |
// Main | |
function combineReducers(reducerDict) { | |
const _initialState = getInitialState(reducerDict); | |
return function(state = _initialState, action) { | |
return Object.keys(reducerDict).reduce((acc, curr) => { | |
let slice = reducerDict[curr](state[curr], action); | |
return { ...acc, [curr]: slice }; | |
}, state); | |
}; | |
} |
This is a fork of original gist https://gist.github.com/nrollr/3f57fc15ded7dddddcc4e82fe137b58e, with slight changes on pointing to 5.7 version branch, instead of 8 (latest default of MySQL in Hombrew).
This procedure explains how to install MySQL using Homebrew on macOS (Sierra 10.12 and up)
- Installing Homebrew is effortless, open Terminal and enter :
$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
- Note: Homebrew will download and install Command Line Tools for Xcode 8.0 as part of the installation process.
This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.
Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).
server { | |
listen 80; | |
server_name EXTERNAL_THINGSBOARD_DOMAIN.com; | |
if ($scheme != "https") { | |
return 301 https://$host$request_uri; | |
} # managed by Certbot | |
} | |
server { |
#!/usr/bin/env python2 | |
# lrdcq | |
# usage python2 unwxapkg.py filename | |
import sys, os | |
import struct | |
class WxapkgFile(object): | |
nameLen = 0 |
var CryptoJS = require('crypto-js') | |
var request = require('request-promise') | |
/* | |
* npm install crypto-js request-promise request | |
* node wx_t1t_hack.js | |
*/ | |
// export function testEncription(msg, fullKey) { | |
// var fullKey = fullKey.slice(0, 16) |
PM2是一款用nodejs实现的进程管理器,本身功能比较强大,在CLI下的指令都比较好用。 PM2可将各种各样的程序维持在后台,不仅仅是nodejs,还可以是ruby,python,java等。其主要使用方法是编写一个描述文件,来描述PM2如何运行你想要的程序。
http://pm2.keymetrics.io/docs/usage/application-declaration/
可惜PM2本身是一款针对持续后台任务'deamon'而设计的管理器,对运行一次就要退出的‘task’不是很友好,所以特写此文纪念逝去的时光。
想让PM2帮你跑定时任务的话,有以下两种两种方法。这两种方法各有利弊,请自行取舍。
一, 自动重启法