Skip to content

Instantly share code, notes, and snippets.

View sherifabdlnaby's full-sized avatar

Sherif Abdel-Naby sherifabdlnaby

View GitHub Profile
@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
@dmattia
dmattia / terragrunt_light.js
Last active March 19, 2024 16:35
A less verbose terragrunt
/**
* Wrapper around terragrunt to display output succinctly on Atlantis.
*
* Terragrunt is notoriously verbose, which can cause Atlantis to output
* hundreds of comments on single PRs, which can be annoying.
*
* This script will output just the final plan for resources to update on
* successful terragrunt runs, but will output all terragrunt output on
* errors.
*/
@nikcub
nikcub / README.md
Created October 4, 2012 13:06
Facebook PHP Source Code from August 2007