## app.R ##
library(shiny)
library(shinydashboard)
ui <- dashboardPage(
dashboardHeader(),
dashboardSidebar(),
dashboardBody(print('Hello World'))
)
- Determine the user + group which has ownership :
stat --format '%U:%G' "/bin/path"
ownership="$(stat --format '%U:%G' '/bin/path')"
- Update ownership & right :
sudo lsof -i -n -P | grep TCP
- The user lauching alpine docker image is member of
dockergroup. As he does not needsudoto use docker
sudo ls -al /root
drwx------ 3 root root 4096 août 9 2015 .
drwxr-xr-x 25 root root 4096 févr. 11 2017 ..
-rw-r--r-- 1 root root 3106 févr. 20 2014 .bashrc
-rw-r--r-- 1 root root 140 févr. 20 2014 .profile
-rw-r--r-- 1 root root 36 janv. 5 2015 .smbcredentials
- BIND MOUNT INSIDE CONTAINER
docker run -v /path/on/host:/data busybox ls /data
- Equivalent way but managed with "docker volume" - This do not work with file, only with directory
docker volume create --opt type=none --opt device=/path/on/host --opt o=bind my_vol
docker run -v my_vol:/data busybox ls /data
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # bash script to generate tree structure of a directory | |
| # Pravendra Singh (@hackpravj) | |
| pwd=$(pwd) | |
| find $pwd -print | sed -e "s;$pwd;\.;g;s;[^/]*\/;|__;g;s;__|; |;g" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/env bash | |
| # Will scan a github repo to compute some statistics on PR | |
| # requires curl and bc (presents on most unix like system) | |
| # PARAMETERS ---------------------------- | |
| # Github repo to scan | |
| GITHUB_REPO="status-im/status-react" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # List block devices | |
| lsblk | |
| NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT | |
| sda 8:0 0 238.5G 0 disk | |
| ├─sda1 8:1 0 200M 0 part /boot/efi | |
| ├─sda2 8:2 0 500M 0 part /boot | |
| └─sda3 8:3 0 237.8G 0 part | |
| ├─fedora-root 253:0 0 50G 0 lvm / | |
| ├─fedora-swap 253:1 0 2G 0 lvm [SWAP] | |
| └─fedora-home 253:2 0 185.9G 0 lvm |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # https://stackoverflow.com/a/28776166 | |
| sourced=0 | |
| if [ -n "$ZSH_EVAL_CONTEXT" ]; then | |
| case $ZSH_EVAL_CONTEXT in *:file) sourced=1;; esac | |
| elif [ -n "$KSH_VERSION" ]; then | |
| [ "$(cd $(dirname -- $0) && pwd -P)/$(basename -- $0)" != "$(cd $(dirname -- ${.sh.file}) && pwd -P)/$(basename -- ${.sh.file})" ] && sourced=1 | |
| elif [ -n "$BASH_VERSION" ]; then | |
| [ "$0" != "$BASH_SOURCE" ] && sourced=1 | |
| else # All other shells: examine $0 for known shell binary filenames | |
| # Detects `sh` and `dash`; add additional shell filenames as needed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| A note about using gmail as a relay | |
| Gmail by default does not allow email clients that don't use OAUTH 2 for authentication (like Thunderbird or Outlook). | |
| First you need to enable access to "Less secure apps" on your google settings. | |
| Serveur de courrier entrant (IMAP) imap.gmail.com | |
| SSL requis : oui | |
| Port : 993 |