Skip to content

Instantly share code, notes, and snippets.

View viniciusstroher's full-sized avatar

Vinicius Ferreira Stroher viniciusstroher

View GitHub Profile

Install Android SDK CLI Ubuntu 20.04 WSL2 (Work in Progress)

Install Java 8

sudo apt install openjdk-8-jdk-headless

Android SDK

# manager.conf
[general]
enabled = yes
webenabled = no
port = 5038
bindaddr = 0.0.0.0
[amidude]
secret = amidude
deny=0.0.0.0/0.0.0.0
version: '3'
services:
asterisk:
build: ./dockerfiles/asterisk
container_name: asterisk
# restart: always
depends_on:
- coturn
volumes:
@viniciusstroher
viniciusstroher / python3_https_server.py
Created January 19, 2022 03:59 — forked from stephenbradshaw/python3_https_server.py
Python 3 Simple HTTPS server
#!/usr/bin/env python3
# python3 update of https://gist.github.com/dergachev/7028596
# Create a basic certificate using openssl:
# openssl req -new -x509 -keyout server.pem -out server.pem -days 365 -nodes
# Or to set CN, SAN and/or create a cert signed by your own root CA: https://thegreycorner.com/pentesting_stuff/writeups/selfsignedcert.html
import http.server
import ssl
httpd = http.server.HTTPServer(('127.0.0.1', 443), http.server.SimpleHTTPRequestHandler)
@viniciusstroher
viniciusstroher / apns.sh
Created August 1, 2021 03:52 — forked from greencoder/apns.sh
Curl the APNS http/2 API
# Note: You MUST have curl 7.47+ with http/2 support compiled in
curl -v \
-d '{"aps":{"alert":"<message>","badge":42}}' \
-H "apns-topic: <bundle id>" \
-H "apns-priority: 10" \
--http2 \
--cert <certificate file> \
https://api.development.push.apple.com/3/device/<device token>
@viniciusstroher
viniciusstroher / troubleshooting.md
Created July 28, 2021 17:02 — forked from cmawhorter/troubleshooting.md
Solution to AWS Lambda node.js UnrecognizedClientException "The security token included in the request is invalid."

Troubleshooting AWS unauthorized errors in lambda requests

This is mainly for node.js but might apply to other environments. Unsure.

If you are running a AWS Lambda function that calls another AWS service and getting an error about invalid tokens or other access denied errors, do this:

Check IAM

The role assigned to your lambda function will need permission to perform the actions. Check IAM and make sure the role has all the permissions.

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@viniciusstroher
viniciusstroher / gist:a4e98a562bab6849cdc4f9b4db63af9f
Created February 15, 2021 14:22
Test Loopback2 Datasource memory e model
const loopback = module.exports = require('loopback');
const datasourceJuggler = require('loopback-datasource-juggler');
describe('Test datasource', () => {
let CatalogIntegrationModel
let CatalogIntegrationCategoryModel
beforeAll(() => {
app = loopback({localRegistry: true, loadBuiltinModels: true});
app.set('remoting', {errorHandler: {debug: true, log: false}});
@viniciusstroher
viniciusstroher / license.txt
Created January 20, 2021 01:51 — forked from codebrainz/license.txt
MJPEG Player in JavaScript
Copyright 2015 Matthew Brush
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
@viniciusstroher
viniciusstroher / install.md
Created November 17, 2020 12:08 — forked from Ryanb58/install.md
How to install telnet into a alpine docker container. This is useful when using the celery remote debugger in a dev environment.
>>> docker exec -it CONTAINERID /bin/sh
/app # telnet
/bin/sh: telnet: not found

/app # apk update
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/main/x86_64/APKINDEX.tar.gz
fetch http://dl-cdn.alpinelinux.org/alpine/v3.7/community/x86_64/APKINDEX.tar.gz
v3.7.0-243-gf26e75a186 [http://dl-cdn.alpinelinux.org/alpine/v3.7/main]
v3.7.0-229-g087f28e29d [http://dl-cdn.alpinelinux.org/alpine/v3.7/community]