Skip to content

Instantly share code, notes, and snippets.

View italopinto's full-sized avatar

Italo italopinto

  • 22:10 (UTC -03:00)
View GitHub Profile
@italopinto
italopinto / search_key_in_json.py
Created June 28, 2023 00:25
Function to recursevely search for a key and returns it's values.
def search_key_in_json(json_obj, search_key):
results = []
if isinstance(json_obj, dict):
for key, value in json_obj.items():
if key == search_key:
results.append(value)
elif isinstance(value, (dict, list)):
results.extend(search_key_in_json(value, search_key))
elif isinstance(json_obj, list):
@italopinto
italopinto / index.html
Created May 3, 2023 19:34
OneSignal custom code implementation example
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="">
<meta name="author" content="">
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon.png">
<title>Home</title>
@italopinto
italopinto / docker-compose.yml
Created April 27, 2022 15:27
Cassandra docker-compose for development purpose.
version: '3.9'
services:
cassandra:
container_name: cassandra
image: cassandra:2.1.17
ports:
- 9042:9042
volumes:
- ./cassandra:/var/lib/cassandra
@italopinto
italopinto / docker-compose.yml
Last active April 26, 2022 14:45
Kong declarative settings demo, with demo credentials in header.
version: '3.7'
services:
kong:
container_name: kong
image: kong:latest
volumes:
- ./kong.yml:/kong/declarative/kong.yml
environment:
- KONG_DATABASE=off
- KONG_DECLARATIVE_CONFIG=/kong/declarative/kong.yml
name: Deploy Node.js to Azure Web App
on: push
env:
AZURE_WEBAPP_NAME: node-app # set this to your application's name
AZURE_WEBAPP_PACKAGE_PATH: "src/" # set this to the path to your web app project, defaults to the repository root
NODE_VERSION: "14.17.3" # node latest LTS version
jobs: