brew cask install virtualbox
curl -L https://github.com/boot2podman/machine/releases/download/v0.17/podman-machine.darwin-amd64 --output /usr/local/bin/podman-machine
sudo chmod +x /usr/local/bin/podman-machine
let drawings = canvas.drawings.controlled; | |
drawings = drawings.map(drawing =>{ | |
switch (drawing.data.type) { | |
case "f": | |
case "p": { | |
let { _id, points, rotation, x, y, width, height } = drawing.data; | |
return { id: _id, valid: true, points, rotation, x, y, width, height }; | |
} | |
case "r": { |
setuid (s) | setgid (s) | sticky (t) | |
---|---|---|---|
Directory | ignored | New subfiles inherit group | Only owner of subfile can (re)move it* |
File | Executes as file owner | Executes as group | ignored |
Sticky bit can be set with chmod
as the first of four digits, or using {+,-}s
(for setuid/setgid) and {+,-}t
(for sticky). For example, to enable setuid,
chmod u+s $FILE # Add setuid to a file
chmod 4755 $FILE # Possible permissions of /bin/ping
Create file /etc/systemd/system/[email protected]
. SystemD calling binaries using an absolute path. In my case is prefixed by /usr/local/bin
, you should use paths specific for your environment.
[Unit]
Description=%i service with docker compose
PartOf=docker.service
After=docker.service
set -e | |
# Stop the docker daemon | |
/etc/init.d/docker stop | |
# Configure ECS Agent | |
# http://docs.aws.amazon.com/AmazonECS/latest/developerguide/ecs-agent-config.html | |
# http://docs.aws.amazon.com/AmazonECS/latest/developerguide/automated_image_cleanup.html | |
cat > /etc/ecs/ecs.config << "EOF" | |
ECS_ENGINE_TASK_CLEANUP_WAIT_DURATION=1h |
docker run \ | |
--name {{printf "%q" .Name}} \ | |
{{- with .HostConfig}} | |
{{- if .Privileged}} | |
--privileged \ | |
{{- end}} | |
{{- if .AutoRemove}} | |
--rm \ | |
{{- end}} | |
{{- if .Runtime}} |
#!/usr/bin/env bash | |
sudo yum groups install -y Development\ tools | |
sudo yum install -y cmake | |
sudo yum install -y python34-{devel,pip} | |
sudo pip-3.4 install neovim --upgrade | |
( | |
cd "$(mktemp -d)" | |
git clone https://github.com/neovim/neovim.git | |
cd neovim | |
make CMAKE_BUILD_TYPE=Release |
### I assume you run the commands as root | |
gradle_version=2.6 | |
wget -c http://services.gradle.org/distributions/gradle-${gradle_version}-all.zip | |
unzip gradle-${gradle_version}-all.zip -d /opt | |
ln -s /opt/gradle-${gradle_version} /opt/gradle | |
printf "export GRADLE_HOME=/opt/gradle\nexport PATH=\$PATH:\$GRADLE_HOME/bin\n" > /etc/profile.d/gradle.sh | |
source /etc/profile.d/gradle.sh | |
# check installation | |
gradle -v |
from cProfile import Profile | |
import pstats | |
def profile(sort_args=['cumulative'], print_args=[10]): | |
profiler = Profile() | |
def decorator(fn): | |
def inner(*args, **kwargs): | |
result = None |