Skip to content

Instantly share code, notes, and snippets.

dasgoll

  • Amman, Jordan
Block or report user

Report or block dasgoll

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gist:185ca8a0ed3a6e4eb3079fc262f7cd53
brew install openssl readline sqlite3 xz zlib
brew install pyenv
add to ~/.zshrc or ~/.bash_profile
eval "$(pyenv init -)"
pyenv install -v 3.6.8
View gist:c83f1ee78f192720f940ab9dec31f7f2
brew install sshfs
sshfs jaraidah@devdsk:/home/jaraidah/workspaces ~/workspaces
@dasgoll
dasgoll / gist:9a3f82cbe63f51bff46f10ff35106a35
Last active Jul 10, 2019
Create html static website on s3
View gist:9a3f82cbe63f51bff46f10ff35106a35
aws s3 mb s3://movies-tutorial123
aws s3 cp ui/ s3://movies-tutorial123 --recursive --grants read=uri=http://acs.amazonaws.com/groups/global/AllUsers
#Finally, turns website hosting on for your bucket:
aws s3 website s3://movies-tutorial123 --index-document index.html
browse: http://movies-tutorial123.s3-website-eu-west-1.amazonaws.com
@dasgoll
dasgoll / gist:47b2826c518adc044cb4f6a6677f1126
Created Jul 9, 2019
requests library in vendored with boto3
View gist:47b2826c518adc044cb4f6a6677f1126
import botocore.vendored.requests as requests
from botocore.vendored.requests.auth import HTTPBasicAuth
resp = requests.post(
'https://httpbin.org',
json={'message': 'hello world'},
auth=HTTPBasicAuth('username', 'password'),
verify=False,
timeout=2)
body = resp.json()
@dasgoll
dasgoll / gist:e61d6ca90714dac1cca96fc4c87eb28f
Last active Jul 8, 2019
Create AWS lambda Python function and invoke it from command line
View gist:e61d6ca90714dac1cca96fc4c87eb28f
mkdir add
cd add
vim main.py
def add(event, context):
return event.get('a') + event.get('b')
zip main.zip main.py
@dasgoll
dasgoll / gist:d12dce95a05c4acc0bf7570b6b57ce76
Last active Jul 8, 2019
Create IAM user with password
View gist:d12dce95a05c4acc0bf7570b6b57ce76
aws iam create-user --user-name jameel
aws iam create-login-profile --user-name jameel --password My!User1Login8P@ssword
### create access for user, save the Secret and Access Key's some where safe
aws iam create-access-key --user-name jameel
View gist:8fef4d05783fb46cba003868461f5a8b
pip install --user virtualenv
python -m virtualenv env
@dasgoll
dasgoll / gist:fc89c1db36c7c66c7280d0d20c8465e1
Created Jul 5, 2019
Install vscodium on macOS and migrate settings and extensions from vscode
View gist:fc89c1db36c7c66c7280d0d20c8465e1
brew cask install vscodium
mkdir -p ~/.vscode-oss/extensions
cp -a ~/.vscode/extensions/* ~/.vscode-oss/extensions
https://github.com/VSCodium/vscodium/blob/master/DOCS.md#migrating-from-visual-studio-code-to-vscodium
@dasgoll
dasgoll / gist:8b6df0e9a59a45529cc150fc8ee2c7ea
Last active May 12, 2019
Fix the "App can’t be opened because it is from an unidentified developer" Error in Mac OS X
View gist:8b6df0e9a59a45529cc150fc8ee2c7ea
### Reference: https://www.youtube.com/watch?v=_gQA3RhcJuU
sudo spctl --master-disable
sudo spctl --master-enable
View gist:ed225b93b255e88168d9b5542df6b557
### Reference: https://www.youtube.com/watch?v=zDa8akDb864
### macOS High Sierra
https://itunes.apple.com/ca/app/macos-high-sierra/id1246284741?mt=12
### macOS Sierra
https://itunes.apple.com/us/app/macos-sierra/id1127487414?ls=1&mt=12
### Mac OS X El Capitan
https://itunes.apple.com/app/os-x-el-capitan/id1147835434?mt=12
You can’t perform that action at this time.