When you use docker with "multiple commands", you will write scripts like this:
run.sh
#!/bin/sh -e
pip install --upgrade poetry
poetry config settings.virtualenvs.create false
poetry install| # Rewrite the WS requests | |
| RewriteCond %{REQUEST_URI} ^/socket.io [NC] | |
| RewriteCond %{QUERY_STRING} transport=websocket [NC] | |
| RewriteRule /(.*) ws://localhost:6001/$1 [P,L] | |
| # Rewrite the HTTP requests | |
| ProxyPass /socket.io http://localhost:6001/socket.io | |
| ProxyPassReverse /socket.io http://localhost:6001/socket.io | |
| # For API requests |
| #!/bin/sh | |
| # This is part of my blog about AES: https://medium.com/p/7616beaaade9 | |
| # Inspired by https://blog.filippo.io/the-ecb-penguin/ | |
| # Convert your image to .ppm with Gimp or Photoshop | |
| # | |
| # Usage: ./ecb_img <image file as ppm> <password> | |
| # extract header and body |
SSHFS stands for (Secure SHell FileSystem) client that enable us to mount remote filesystem and interact with remote directories and files on a local machine using SSH File Transfer Protocol (SFTP).
SFTP is a secure file transfer protocol that provides file access, file transfer and file management features over Secure Shell protocol. Because SSH uses encryption while transferring files over the network from one computer to another computer and SSHFS comes with built-in FUSE (Filesystem in Userspace) kernel module that allows any non-privileged users to create their file system without modifying kernel code.
In this article, we will show you how to install and use SSHFS client on any Linux distribution to mount remote Linux filesystem or directory on a local Linux machine.
By default sshfs packages does not exists on all major Linux distributions, you need to enable epel repository under your Linux systems to install sshfs w
| tail -f -n 450 storage/logs/laravel*.log \ | |
| | grep -i -E \ | |
| "^\[\d{4}\-\d{2}\-\d{2} \d{2}:\d{2}:\d{2}\]|Next [\w\W]+?\:" \ | |
| --color |
| # Change to the project directory | |
| cd $FORGE_SITE_PATH | |
| # Turn on maintenance mode | |
| php artisan down || true | |
| # Pull the latest changes from the git repository | |
| # git reset --hard | |
| # git clean -df | |
| git pull origin $FORGE_SITE_BRANCH |
| private void addAutoStartupswitch() { | |
| try { | |
| Intent intent = new Intent(); | |
| String manufacturer = android.os.Build.MANUFACTURER .toLowerCase(); | |
| String model= Build.MODEL; | |
| Log.d("DeviceModel",model.toString()); | |
| switch (manufacturer){ | |
| case "xiaomi": |
/app
├── /Application
| ├── /Exceptions
| ├── /Middlewares
| ├── /Providers
| ├── /Requests
├── /Domain
| ├── /MyDomainA
| | ├── /Contracts| import 'package:flutter/material.dart'; | |
| class MyApp extends StatefulWidget { | |
| @override | |
| _MyAppState createState() => new _MyAppState(); | |
| } | |
| class _MyAppState extends State<MyApp> { | |
| int _currentStep = 0; |