To retrieve the IP address from the command line, you can use the following methods based on your operating system:
Obtaining the path of a bash script can be useful in various scenarios.
In Linux, you can use various commands and tools to obtain disk usage statistics, like df
or du
.
Vim (Vi Improved) is a highly configurable, powerful, and widely used text editor available on various platforms, including Linux, macOS, and Windows. It is based on the older Vi editor, which was originally created for the Unix operating system.
A container runtime, also known as a container engine, is a software component responsible for running and managing containers on a host system. It is a crucial part of containerization technologies like Docker and Kubernetes. The container runtime provides the necessary infrastructure and functionality to create, deploy, and manage containers efficiently.
https://www.zend.com/blog/php-8-1
When building a chat application, you typically need a database to store and manage the chat messages, user information, and other relevant data. Here are some common database options for chat applications.
Booting Windows from a USB device provides flexibility, enables troubleshooting and repairs, facilitates system installations and upgrades, and allows for testing and data recovery. It offers an alternative way to access and work with Windows, especially in situations where the computer’s internal storage or operating system is unavailable or problematic.
Delete files before 1st of previous month.
Data Warehouse | Data Lake | |
---|---|---|
Data type | Only structured data | AUnstructured or raw |
Schema | On-Wirte | On-Read |
User | Business user | Data professionals |
Data Processing | Extract, Transform, Load | Extract, Load, Transform |
Application | Business Report/Record | AI/ML, Data science |
Accessibility | More complicated and costly to make changes | Highly accessible and quick to update |
Storage | Only required data is kept | Can keep any data |
Cost | High | Low |
```bash
A time series database (TSDB) is a software system that is optimized for storing and serving time series through associated pairs of time(s) and value(s).[1] In some fields, time series may be called profiles, curves, traces or trends.[2] Several early time series databases are associated with industrial applications which could efficiently store measured values from sensory equipment (also referred to as data historians), but now are used in support of a much wider range of applications. – wiki
graph TB
B((Source code storage)) -- pull/checkout/clone --> C(Pipeline)
C(Pipeline) -- Test & build --> D[Application]
D[Application] -- store --> E((Distribution))
A((Infrastructure)) -- provisioning --> G(Instance)
E((Distribution)) -- load --> F(Deployment)
F(Deployment) -- deploy --> G(Instance)
txtgrn=$(tput setaf 2) # Green
txtylw=$(tput setaf 3) # Yellow
txtblu=$(tput setaf 4) # Blue
txtpur=$(tput setaf 5) # Purple
txtcyn=$(tput setaf 6) # Cyan
txtwht=$(tput setaf 7) # White
txtrst=$(tput sgr0) # Text reset.
When you manage your project’s repositories in Bitbucket or GitHub, or use Fisheye to browse and search your repositories, you can process your Jira Software issues using special commands, called Smart Commits, in your commit messages.1
Laravel 8 released on September 8th, 2020, bug fixes until April 6th, 2021, and security fixes until September 8th, 2021. 1
update Updates conda packages to the latest compatible version. upgrade Alias for conda update.
https://www.tecmint.com/ssh-passwordless-login-using-ssh-keygen-in-5-easy-steps/
https://wesoundeffects.com/we-sound-effects-bundle-2020/
Laravel 7 released on March 3rd 2020, bug fixes until September 3rd 2020, and security fixes until March 3rd 2021 1
apt-get clean && rm -rf /var/lib/apt/lists/*
Repo: https://github.com/jupyter/docker-stacks
There are 3 events around a Model being saved in the database. 1
```python import logging import logging.handlers
```sql
```bash
composer require –dev codeception/codeception
Result Code: | E_FAIL (0x80004) |
---|---|
Component: | ConsoleWrap |
Interface: | IConsole {872da645-bee2} |
#no
readme.md
fileBasicly, download binary package from repo.
alpine:3.8
Classification | Title | Fee | Length |
---|---|---|---|
Associate | ~ Cloud Engineer | US$125 | 2h |
Professional | ~ Cloud Architect | US$200 | 2h |
Professional | ~ Data Engineer | US$200 | 2h |
Professional | ~ Cloud Developer | US$200 | 2h |
Professional | ~ Cloud Network Engineer | US$200 | 2h |
Professional | ~ Cloud Security Engineer | US$200 | 2h |
Professional | ~ Collaboration Engineer | US$120 | 4h |
APIs (Application Programming Interfaces) are software programs that give developers access to computing resources and data. Companies from many different fields offer publicly available APIs so that developers can integrate specialized tools, services, or libraries with their own applications and codebase.
http://bit.ly/2Wvk5Au class note
https://github.com/puikinsh/Adminator-admin-dashboard https://hackerthemes.com/bootstrap-templates/spur/ https://colorlib.com/wp/free-admin-templates/
ini
file or .env
file
A simple php script for deploy using bitbucket webhook 1
Apache Flink is a framework and distributed processing engine for stateful computations over unbounded and bounded data streams. Flink has been designed to run in all common cluster environments, perform computations at in-memory speed and at any scale. 1
Docker needs at least CentOS 7 (CentOS Linux release 7.5.1804 (Core)) 1
[Docker | 第四章:Dockerfile简单介绍及使用](https://www.imooc.com/article/68972) |
9 Principles for k8s security 1
kubectl get ns
gcloud container clusters list
5 lines code make a HTTP server 1
12 principles 1 :
exec
: returns the last line of the output by default, but can provide all output as an array specifed as the second parameter.shell_exec
: returns all of the output stream as a string. 1system()
: displays output directly without using echo or print. 2passthru()
: when the output from the Unix command is binary data 3proc_open()
: proc_open — Execute a command and open file pointers for input/output 4``` yum install epel-release -y yum install nodejs npm bzip2 fontconfig -y
Generate key 1
Using network-manager
1.
apt-get install network-manager
nmcli dev show | grep DNS
nm-tool | grep DNS
apt-get remove docker.io
apt-get autoremove
apt-get clean
```bash docker pull osixia/openldap
@ECHO OFF
setlocal DISABLEDELAYEDEXPANSION
SET BIN_TARGET=%~dp0/../agilekeys/cans/bin/cans
bash "%BIN_TARGET%" %*
Flutter allows you to build beautiful native apps on iOS and Android from a single codebase.1
Using OpenSSL to generate all of our certificates.[^1] [^1]: How to get HTTPS working on your local development environment in 5 minutes
In the modern era, software is commonly delivered as a service: called web apps, or software-as-a-service.
ubuntu
docker imagedocker pull ubuntu
SHOW GRANTS Syntax 1
SHOW GRANTS;
SHOW GRANTS FOR CURRENT_USER;
SHOW GRANTS FOR CURRENT_USER();
composer self-update
docker #0091e2 php #8892BF laravel #e74430 https://www.shutterstock.com/image-vector/soft-drink-can-top-view-icon-462004963 http://www.whitehouse51.com/best-logo-designs-2016/1/50-best-logos-of-2016-logos-graphic-design-junction/
brew install zsh zsh-completions
install zsh 1oh-my-zsh
by using sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
2~/.zshrc
chsh -s /bin/zsh
Package libraries [^5] [^5]: Larlibs
There’s the problem with DDD, it’s not orientated to technical considerations.1
Container::singleton
is the same as Container::bind
with the third parameter set to true
. 1
SOLID is a common acronym in the software development world. It’s useful to remeber five best practices to design classes in a object oriented language.1
Detail | Non thread safe | thread safe |
---|---|---|
Thread | single thread is used | multi-processing |
Env | CGI binary, command line | env need multiple PHP threads |
Web server | Nginx/Lighttpd | Apache MPM |
self
jupyter
$posts = App\Post::whereHas('comments', function ($query) {
$query->where('content', 'like', 'foo%');
})->get();
Iterable is a pseudo-type introduced in PHP 7.1.
The hospital administrator is cheating!
If it’s new laravel project and you are running mysql < 5.7. You need fix this. ``` composer require laravel/passport
What does this symbol mean in PHP? 1
https://www.moesif.com/blog/api-guide/api-design-guidelines/
Common traceback errors:1
REST and GraphQL framework to build modern API-driven projects
sudo dpkg-reconfigure tzdata
Apache OpenWhisk (Incubating) is a serverless, open source cloud platform that executes functions in response to events at any scale.1
A collection of many awesomen code, tools, project and application1.
Algorithmia is a serverless algorition hosting and marketplace. You can deploy your algorition to a serverless AI Layer. If you have a good idea, Algorithmia allow you to implement your idea as quick as possible1.
Keyword: PHP-DI, PSR-11, Autowriing
Two way to quick study a new stuff.
class Parent{
public function sum($numbers){}
}
class Child extends Parent{
public function sum(array $numbers){}
}
Book
Source code
ref
```go package main
python -c "import openpyxl; print(openpyxl.__version__)"
python -c "import numpy; print(numpy.__version__)"
A SNS force on job.
lrwxrwxrwx 1 root root 12 Jan 9 19:37 passwd -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 paste -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 patch -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 pgrep -> /bin/busybox
-rwxr-xr-x 1 root root 208 Nov 21 2017 pip3
-rwxr-xr-x 1 root root 208 Nov 21 2017 pip3.6
lrwxrwxrwx 1 root root 12 Jan 9 19:37 pkill -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 pmap -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 printf -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 pscan -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 pstree -> /bin/busybox
lrwxrwxrwx 1 root root 12 Jan 9 19:37 pwdx -> /bin/busybox
lrwxrwxrwx 1 root root 8 Jul 4 00:26 pydoc3 -> pydoc3.6
-rwxr-xr-x 1 root root 78 Nov 21 2017 pydoc3.6
lrwxrwxrwx 1 root root 9 Jul 4 00:26 python3 -> python3.6
-rwxr-xr-x 2 root root 5.7K Nov 21 2017 python3.6
-rwxr-xr-x 2 root root 5.7K Nov 21 2017 python3.6m
lrwxrwxrwx 1 root root 10 Jul 4 00:26 pyvenv -> pyvenv-3.6
-rwxr-xr-x 1 root root 435 Nov 21 2017 pyvenv-3.6
https://breezy.hr/
Virtualgo (or vg for short) is a tool which provides workspace based development for Go. Its main feature set that makes it better than other solutions is as follows:
A virtual environment is a self-contained Python environment that allows you to isolate Python packages and dependencies for different projects. It provides a way to create a separate environment with its own installed packages, Python interpreter, and configuration settings, independent of the system-wide Python installation.
Popular open data repositories:
become-good-programer https://juejin.im/post/5b320a9a6fb9a00e9b3a0d41
``` brew install sphinx-doc
Ref https://blog.tiger-workshop.com/laravel-queue-job-class-demystified-shouldqueue-dispatchable-interactswithqueue-queueable-serializesmodels/
A blockchain includes a group of serilized blocks. The start block is called the genesis block.
1.TensorFlow API 2.TensorBoard 3.TensorFlow
line move up/down line replication remove line select next select all
Setup CLI command instance by using github.com/urfave/cli
.
Input x1 | Input x2 | Input x3 | Output Y |
---|---|---|---|
0 | 0 | 1 | 0 |
0 | 1 | 1 | 1 |
1 | 0 | 1 | 1 |
1 | 1 | 1 | 0 |
```mermaid graph TB
go test ./...
: run all test cases in correct directorygo test -cover
: display test case coveragego test -run Name
: run specific golang test case~1.2.3
means 1.2.3 <= version < 1.3.0
^1.2.3
means 1.2.3 <= version < 2.0.0
``` apk add git nano go musl-dev
```mermaid sequenceDiagram
Directory and file | Comment |
---|---|
/proc/N | process PID is N |
/proc/N/cmdline | command start process |
/proc/N/cwd | link to process current word directory |
/proc/N/environ | Env var list for process |
/proc/N/exe | link to process executable command file |
/proc/N/fd | includes all file desc of process related file |
/proc/N/maps | process related memory info |
/proc/N/mem | memory space of current process, not readable |
/proc/N/root | root directory of process |
/proc/N/stat | status of process |
/proc/N/statm | memory status of process |
/proc/N/status | process status, better than stat and statm |
/proc/self/ | current process |
copy-on-write
CoW
.
``` docker run -it –rm dockercraft/composer
docker run -it --rm --name teamcity \
-v /var/teamcity/datadir:/data/teamcity_server/datadir \
-v /var/teamcity/log:/opt/teamcity/logs \
-p 8111:8111 \
jetbrains/teamcity-server
Working try first command, not use second one
composer update --no-scripts
composer dump-autoload -o
Install laravel
composer create-project --prefer-dist laravel/laravel project
Ref
Ref:
ple
``` sudo docker run -it –rm -v /home/www-user/tmp:/backup dockercraft/mysql-client /bin/sh
```php $entities = DB::table(‘temp’)->get()->toArray();
find . -name 'oltp*'*
``` sudo docker run -it –rm -v ./mysql:/mysql mysql:5.6 /bin/bash sudo docker run -it –rm -v /home/www-user/mysql:/mysql mysql:5.6 /bin/bash sudo docker run -d –rm -v /home/www-user/mysql:/var/lib/mysql mysql:5.6 /bin/bash sudo docker run -it –rm -v /home/www-user/mysql:/mysql -v /home/www-user/etc/mysql:/etc-mysql mysql:5.6 /bin/bash sudo docker run -d –rm -v /home/www-user/mysql:/mysql -v /home/www-user/etc/mysql:/etc/mysql -p 3306:3306 -e MYSQL_ROOT_PASSWORD=simplepassword mysql:5.6
___ ______ ____ _ _ ___
/ \ \ / / ___| / ___| | ___ _ _ __| |/ _ \
/ _ \ \ /\ / /\___ \ | | | |/ _ \| | | |/ _` | (_) |
/ ___ \ V V / ___) | | |___| | (_) | |_| | (_| |\__, |
/_/ \_\_/\_/ |____/ \____|_|\___/ \__,_|\__,_| /_/ -----------------------------------------------------------------
CLONE_NEWUTS
create new UTS namespaceCLONE_NEWIPC
create new IPC NamespaceCLONE_NEWPID
create new PID namespaceCLONE_NEWNS
“symplify/coding-standard”: “^4.4”, “symplify/easy-coding-standard”: “^4.4”,
``` location ~ .php$ { proxy_intercept_errors on; fastcgi_keep_conn on; client_max_body_size 1024M; try_files $uri =404;
/Users/DHome/Dockercraft/nginx/ningx
Make sure your OS support zlib (linux package) Example of alpine linux
apk add zlib-dev
``` FROM dockercraft/alpine:3.7 MAINTAINER Daniel daniel@topdevbox.com
\
for php function``` \isset($var);
```mermaid graph LR
Create new website
hugo new site .
It is a fully-managed platform that enables developers and data scientists to quickly and easily build, train, and deploy machine learning models at any scale.
```bash FROM ubuntu:18.04
https://johannespichler.com/from-json-to-model-instances-in-php/
// return null|int
function checkAge($age): ?int
{
if($age > 12){
return $age;
}else{
return null;
}
}
https://docs.travis-ci.com/user/docker/ https://docs.travis-ci.com/user/languages/ruby/#stq=&stp=0 https://docs.travis-ci.com/user/deployment/s3/
```php \Illuminate\Support\Facades\Artisan::call(‘command’, [ ‘param1’ => ‘value’, ‘–param2’ => ‘value’, ]);
{
"Version": "2012-10-17",
"Statement": [
{
"Sid": "PublicReadGetObject",
"Effect": "Allow",
"Principal": "*",
"Action": [
"s3:GetObject"
],
"Resource": [
"arn:aws:s3:::example-bucket/*"
]
}
]
}
Description | Example |
---|---|
Every minute | * * * * * |
Every 2nd minute | * /2 * * * |
At minute 30. | 30 * * * * |
At 00:00. | 0 0 * * * |
The deletion distance of two strings is the minimum number of characters you need to delete in the two strings in order to get the same string. For instance, the deletion distance between heat
and hit
is 3
:
```php $classPath = \explode(“\”, NAMESPACE); \array_pop($classPath); $newPath = \implode(“\”, $classPath) . “\Drivers\”; $className = $newPath . Str::studly($this->driver); if (!\class_exists($className)) { throw new DriverException(‘Could not find driver’); }
```php const FLAG_1 = 0b0001; // 1 const FLAG_2 = 0b0010; // 2 const FLAG_3 = 0b0100; // 4 const FLAG_4 = 0b1000; // 8 // Can you see the pattern? ;-)
```mermaid graph TB
In PHP, the global space refers to the highest level of the PHP namespace hierarchy. It is also known as the global scope or global namespace. When you define variables, functions, classes, or constants outside of any namespaces, they are considered to be part of the global space.
You’ll find this post in your _posts
directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve
, which launches a web server and auto-regenerates your site when a file is updated.
No result