Skip to content

Instantly share code, notes, and snippets.

View shrhawk-entertainer's full-sized avatar

Syed Hassan Raza shrhawk-entertainer

View GitHub Profile
@maxivak
maxivak / _0__ssl_certbot_letsencrypt.md
Last active July 12, 2024 22:22
Let's encrypt SSL certificates using certbot in docker

Directories on host machine:

  • /data/certbot/letsencrypt

  • /data/certbot/www

  • Nginx server in docker container

docker run -d --name nginx \
@bradtraversy
bradtraversy / node_nginx_ssl.md
Last active July 22, 2024 05:09
Node app deploy with nginx & SSL

Node.js Deployment

Steps to deploy a Node.js app to DigitalOcean using PM2, NGINX as a reverse proxy and an SSL from LetsEncrypt

1. Sign up for Digital Ocean

If you use the referal link below, you get $10 free (1 or 2 months) https://m.do.co/c/5424d440c63a

2. Create a droplet and log in via ssh

I will be using the root user, but would suggest creating a new user

@djg07
djg07 / lambda_handler.py
Created August 18, 2019 17:45
DynamoDB Streams Lambda Handler
import json
print('Loading function')
def lambda_handler(event, context):
print('------------------------')
print(event)
#1. Iterate over each record
try:
for record in event['Records']:
@debasishg
debasishg / encode_decode_dictionary.py
Created January 30, 2019 10:11 — forked from khornberg/encode_decode_dictionary.py
python 3 base64 encode dict
"""
Given a dictionary, transform it to a string. Then byte encode that string. Then base64 encode it and since this will go
on a url, use the urlsafe version. Then decode the byte string so that it can be else where.
"""
data = base64.urlsafe_b64encode(json.dumps({'a': 123}).encode()).decode()
# And the decode is just as simple...
data = json.loads(base64.urlsafe_b64decode(query_param.encode()).decode())
# Byte encode the string, base64 decode that, then byte decode, finally transform it to a dictionary
@yanivmn
yanivmn / open-source-sso.md
Last active June 18, 2024 07:22 — forked from bmaupin/open-source-sso.md
Comparison of open-source SSO implementations
Aerobase Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes third-party
Multi-factor authentication yes yes yes yes yes yes yes
Admin UI yes yes yes yes yes yes no
OpenJDK support yes yes yes yes no
Identity brokering yes yes yes
Middleware NGINX, Wildfly Wildfly, JBOSS WSO2 Carbon Jetty, Apache HTTPD any Java app server any Java app server Jetty, Tomc
curl "https://api.GitHub.com/repos/<GitHubUserName>/<REPO_NAME>/statuses/$GIT_COMMIT?access_token=<YOUR_GITHUB_TOKEN>" \
-H "Content-Type: application/json" \
-X POST \
-d "{\"state\": \"failure\",\"context\": \"continuous-integration/jenkins\", \"description\": \"Jenkins\", \"target_url\": \"<YOUR_JENKINS_URL>/job/<JenkinsProjectName>/$BUILD_NUMBER/console\"}"
@bmaupin
bmaupin / open-source-sso.md
Last active July 19, 2024 08:06
Comparison of some open-source SSO implementations

ⓘ This list is not meant to be exhaustive and is not guaranteed to be maintained. See the comments for updates and alternative options.

(Items in bold indicate possible concerns)

Keycloak WSO2 Identity Server Gluu CAS OpenAM Shibboleth IdP
OpenID Connect/OAuth support yes yes yes yes yes yes
Multi-factor authentication yes yes yes yes yes yes
Admin UI yes yes yes yes yes no
OpenJDK support yes yes partial² yes
@berkedel
berkedel / flow-error-icu4c-not-loaded.md
Created April 4, 2018 14:13
dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

How to solve dyld: Library not loaded: /usr/local/opt/icu4c/lib/libicui18n.60.dylib

brew uninstall --ignore-dependencies node icu4c
brew install node
@rowlandekemezie
rowlandekemezie / Instructions.js
Created March 10, 2018 19:05
Update and Delete request with redux-saga
/*
1) Depending on your experience, this is all you might need to do to hook up your workflow
2) Remember, not to copy and paste. My idea is to show you how things fit it to you can tailor it to your application
GRACIAS 💪
*/
@merikan
merikan / Jenkinsfile
Last active June 13, 2024 03:56
Some Jenkinsfile examples
Some Jenkinsfile examples