$ cd /path/to/Dockerfile
$ sudo docker build .
View running processes
| declare module 'grapesjs-custom-code'; | |
| declare module 'grapesjs-lory-slider'; | |
| declare module 'grapesjs-parser-postcss'; | |
| declare module 'grapesjs-preset-webpage'; | |
| declare module 'grapesjs-style-bg'; | |
| declare module 'grapesjs-tabs'; | |
| declare module 'grapesjs-tooltip'; | |
| declare module 'grapesjs-touch'; | |
| declare module 'grapesjs-tui-image-editor'; | |
| declare module 'grapesjs-typed'; |
| #!/bin/bash | |
| set -ex | |
| ## Uninstall portworx on Ubuntu 16.04 (and probably future versions) | |
| ## curl -sSL 'https://gist.githubusercontent.com/koshatul/407c09b2aeff92d2bd59533c4ccec983/raw/uninstall-portworx.sh' | /bin/bash /dev/stdin -- | |
| set +ex | |
| sudo systemctl stop portworx | |
| sudo systemctl disable portworx |
| # ---- Base Node ---- | |
| FROM node:carbon AS base | |
| # Create app directory | |
| WORKDIR /app | |
| # ---- Dependencies ---- | |
| FROM base AS dependencies | |
| # A wildcard is used to ensure both package.json AND package-lock.json are copied | |
| COPY package*.json ./ | |
| # install app dependencies including 'devDependencies' |
Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.
As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.
| <?php | |
| function decryptRij($text) { | |
| $salt = "my custom key"; | |
| return trim(mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $salt, base64_decode($text), MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND))); | |
| } | |
| function encryptRij($text) { | |
| $salt = "my custom key"; | |
| return trim(base64_encode(mcrypt_encrypt(MCRYPT_RIJNDAEL_256, $salt, $text, MCRYPT_MODE_ECB, mcrypt_create_iv(mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB), MCRYPT_RAND)))); | |
| } |
| module.exports = function(grunt) { | |
| grunt.initConfig({ | |
| pkg: grunt.file.readJSON('package.json'), | |
| sass: { | |
| dist: { | |
| options:{ | |
| style:'compressed' | |
| }, | |
| files: { | |
| 'css/style.css' : 'scss/style.scss' |
A list of amazingly awesome PHP libraries that you should be using:
| -- show running queries (pre 9.2) | |
| SELECT procpid, age(clock_timestamp(), query_start), usename, current_query | |
| FROM pg_stat_activity | |
| WHERE current_query != '<IDLE>' AND current_query NOT ILIKE '%pg_stat_activity%' | |
| ORDER BY query_start desc; | |
| -- show running queries (9.2) | |
| SELECT pid, age(clock_timestamp(), query_start), usename, query | |
| FROM pg_stat_activity | |
| WHERE query != '<IDLE>' AND query NOT ILIKE '%pg_stat_activity%' |
| <?php | |
| function encryptPassword($value){ | |
| if(!$value){return false;} | |
| $text = $value; | |
| $iv_size = mcrypt_get_iv_size(MCRYPT_RIJNDAEL_256, MCRYPT_MODE_ECB); | |
| $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND); | |
| $crypttext = mcrypt_encrypt(MCRYPT_RIJNDAEL_256, SECRET_KEY, $text, MCRYPT_MODE_ECB, $iv); | |
| return trim(base64_encode($crypttext)); //encode for cookie | |
| } |