Skip to content

Instantly share code, notes, and snippets.

@aabed
aabed / slack2iphone.sh
Created July 19, 2022 23:18
Export Slack Members Into Iphone Contacts
export ORG_NAME="Some Company" #change that to your company's name
export SLACK_TOKEN="xoxb-**************************" #Your slack token
curl -L -v -H "Authorization: Bearer $SLACK_TOKEN" "https://slack.com/api/users.list" > contacts.json
cat contacts.json | jq '.members[]?.profile|select(.phone != "")| .real_name+"-"+.phone'| sed 's/\"//g'| while IFS= read -r item; do echo "BEGIN:VCARD\nVERSION:3.0\nFN:${item%-*}\nTEL;TYPE=CELL:${item#*-}\nN:`echo ${item%-*}| awk '{if ($3){ print $3";"$1";"$2} else {print $2";"$1}}'`;;;\nitem1.ORG:${ORG_NAME}\nitem1.X-ABLabel:unknown\nCATEGORIES:myContacts\nEND:VCARD" ; done> contacts.vcf
In PHP-FPM (FastCGI Process Manager), the `pm.start_servers` directive is part of the pool configuration and determines the number of child server processes that should be created when PHP-FPM starts. PHP-FPM uses a process manager to handle incoming requests and distribute them among a pool of worker processes. The `pm.start_servers` setting specifically defines the number of child processes that should be created at the beginning to handle incoming requests.
Here's a breakdown of how `pm.start_servers` works:
1. **Startup**: When PHP-FPM starts, it needs to create a certain number of child processes to handle incoming requests. These child processes are responsible for executing PHP scripts.
2. **pm.start_servers**: This directive sets the number of child processes that should be created during the startup phase. For example, if `pm.start_servers` is set to 5, PHP-FPM will spawn 5 child processes when it starts.
3. **Balancing Load**: The total number of child processes created includes not only the `pm
In PHP-FPM (FastCGI Process Manager), the `pm.start_servers` directive is part of the pool configuration and determines the number of child server processes that should be created when PHP-FPM starts. PHP-FPM uses a process manager to handle incoming requests and distribute them among a pool of worker processes. The `pm.start_servers` setting specifically defines the number of child processes that should be created at the beginning to handle incoming requests.
Here's a breakdown of how `pm.start_servers` works:
1. **Startup**: When PHP-FPM starts, it needs to create a certain number of child processes to handle incoming requests. These child processes are responsible for executing PHP scripts.
2. **pm.start_servers**: This directive sets the number of child processes that should be created during the startup phase. For example, if `pm.start_servers` is set to 5, PHP-FPM will spawn 5 child processes when it starts.
3. **Balancing Load**: The total number of child processes created includes not only the `pm

In PHP-FPM (FastCGI Process Manager), the pm.start_servers directive is part of the pool configuration and determines the number of child server processes that should be created when PHP-FPM starts. PHP-FPM uses a process manager to handle incoming requests and distribute them among a pool of worker processes. The pm.start_servers setting specifically defines the number of child processes that should be created at the beginning to handle incoming requests.

Here's a breakdown of how pm.start_servers works:

  1. Startup: When PHP-FPM starts, it needs to create a certain number of child processes to handle incoming requests. These child processes are responsible for executing PHP scripts.

  2. pm.start_servers: This directive sets the number of child processes that should be created during the startup phase. For example, if pm.start_servers is set to 5, PHP-FPM will spawn 5 child processes when it starts.

  3. Balancing Load: The total number of child processes created includes not only the `pm