$ curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash
$ sudo apt-get install -y nodejs
See:
Declare PtrSafe Function DispCallFunc Lib "OleAut32.dll" (ByVal pvInstance As Long, ByVal offsetinVft As Long, ByVal CallConv As Long, ByVal retTYP As Integer, ByVal paCNT As Long, ByRef paTypes As Integer, ByRef paValues As Long, ByRef retVAR As Variant) As Long | |
Declare PtrSafe Function LoadLibrary Lib "kernel32" Alias "LoadLibraryA" (ByVal lpLibFileName As String) As Long | |
Declare PtrSafe Function GetProcAddress Lib "kernel32" (ByVal hModule As Long, ByVal lpProcName As String) As Long | |
Const CC_STDCALL = 4 | |
Const MEM_COMMIT = &H1000 | |
Const PAGE_EXECUTE_READWRITE = &H40 | |
Private VType(0 To 63) As Integer, VPtr(0 To 63) As Long |
#!/bin/bashPARAMS=""while (( "$#" )); do | |
case "$1" in | |
-a|--my-boolean-flag) | |
MY_FLAG=0 | |
shift | |
;; | |
-b|--my-flag-with-argument) | |
if [ -n "$2" ] && [ ${2:0:1} != "-" ]; then | |
MY_FLAG_ARG=$2 | |
shift 2 |
/* Center of Gravity Finder | |
This script will find the center of gravity (centroid) of all closed paths in the selection set. It was built for a specific purpose so does not have much error | |
handling. For example, if you get errors it may be the result of the selection set containing compound shapes or a self-intersecting polygon. | |
References for the math: | |
http://paulbourke.net/geometry/polygonmesh/ (Calculating the area and centroid of a polygon) | |
https://en.wikipedia.org/wiki/Centroid#Centroid_of_polygon | |
Save this file with a jsx extension and place in your Illustrator/Presets/en_US/Scripts folder. You can then access it from the File > Scripts menu |
#!/bin/bash | |
if [[ "$1" = "" ]]; then | |
echo "Usage:" | |
echo " -a foo|bar Select foo or bar" | |
echo " -v verbose (set -x)" | |
echo " --arg1 One arg" | |
echo "" | |
echo "Example: | |
echo " ./arguments.sh -a foo --arg1" |
Podman has recently added support for named volumes, which is super handy.
As of today (2018-01-17), it supports the local
driver, which effectively
will bind-mount a tracked directory into one or more containers. It's helpful
to be able to limit the size of data volumes though so that one container
doesn't exhaust the resources of another.
Fortunately, the XFS filesystem let's us handle this natively using "project quotas". XFS allows setting quotas based on username, group, or project. The project quota effectively maps a project ID to a path on a filesystem.
This tutorial describes how to install TLS to a mail server consisting of Postfix and/or Dovecot by using Let's Encrypt certificates with automatic renewing and firewall management.
The system used for this tutorial was:
$ lsb_release -idrc
Distributor ID: Ubuntu
RUN apt update
RUN apt upgrade -y
RUN apt install -y apt-utils
RUN a2enmod rewrite
RUN apt install -y libmcrypt-dev
RUN apt install -y libicu-dev
RUN docker-php-ext-install -j$(nproc) intl
RUN apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libpng12-dev
RUN docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/