Skip to content

Instantly share code, notes, and snippets.

View nicc777's full-sized avatar
🏠
Working from home

Nico Coetzee nicc777

🏠
Working from home
  • Utrecht, Netherlands
View GitHub Profile
@nicc777
nicc777 / notes.md
Last active April 6, 2024 11:57
Python Datetime Changes for UTC from 3.12
@nicc777
nicc777 / README.md
Created January 7, 2024 07:39
Quickly get a list of installed VS Code Extensions

Just run the following command:

cat ~/.vscode/extensions/extensions.json | jq -r ".[] | .identifier.id"
@nicc777
nicc777 / README.md
Last active December 31, 2023 09:26
Bash script for quick Python based AWS Lambda Function Packaging

AWS Python Lambda Function Packaging

The script will create a ZIP file according to the AWS Documented process.

The resulting ZIP file can then be uploaded to S3 from where you can create the Lambda function, either by the AWS CLI, the AWS Console or by AWS CloudFormation. Just supply the S3 ZIP file URL and your Lambda function will be created.

Basic Workflow

  1. Create a directory for your Python script (Lambda function) and create the initial script. If you need additional packages, specify then in a requirements.txt file in the same directory as the Python script
  2. Code... coffee... code... coffee... etc. (repeat as required)
@nicc777
nicc777 / app.log
Created December 30, 2023 07:15
kftray log - 2023-12-30 #1
[2023-12-30T07:12:55Z TRACE hyper::client::pool] checkout waiting for idle connection: ("https", github.com)
[2023-12-30T07:12:55Z DEBUG reqwest::connect] starting new connection: https://github.com/
[2023-12-30T07:12:55Z TRACE hyper::client::connect::http] Http::connect; scheme=Some("https"), host=Some("github.com"), port=None
[2023-12-30T07:12:55Z DEBUG hyper::client::connect::dns] resolving host="github.com"
[2023-12-30T07:12:55Z DEBUG hyper::client::connect::http] connecting to 140.82.121.3:443
[2023-12-30T07:12:55Z DEBUG hyper::client::connect::http] connected to 140.82.121.3:443
[2023-12-30T07:12:55Z TRACE hyper::client::conn] client handshake Http1
[2023-12-30T07:12:55Z TRACE hyper::client::client] handshake complete, spawning background dispatcher task
[2023-12-30T07:12:55Z TRACE hyper::proto::h1::conn] flushed({role=client}): State { reading: Init, writing: Init, keep_alive: Busy }
[2023-12-30T07:12:55Z TRACE hyper::client::pool] checkout dropped for ("https", github.com)
@nicc777
nicc777 / gist:848e6d547cc84bb299de9ad1110f5455
Created November 13, 2023 05:14 — forked from rxaviers/gist:7360908
Complete list of github markdown emoji markup

People

:bowtie: :bowtie: 😄 :smile: 😆 :laughing:
😊 :blush: 😃 :smiley: ☺️ :relaxed:
😏 :smirk: 😍 :heart_eyes: 😘 :kissing_heart:
😚 :kissing_closed_eyes: 😳 :flushed: 😌 :relieved:
😆 :satisfied: 😁 :grin: 😉 :wink:
😜 :stuck_out_tongue_winking_eye: 😝 :stuck_out_tongue_closed_eyes: 😀 :grinning:
😗 :kissing: 😙 :kissing_smiling_eyes: 😛 :stuck_out_tongue:
@nicc777
nicc777 / debug_http.py
Created September 25, 2023 06:54 — forked from hartsock/debug_http.py
A snippet of code that shows how to turn on debugging for the Python HTTP client library
import requests
import logging
# These two lines enable debugging at httplib level (requests->urllib3->http.client)
# You will see the REQUEST, including HEADERS and DATA, and RESPONSE with HEADERS but without DATA.
# The only thing missing will be the response.body which is not logged.
try:
import http.client as http_client
except ImportError:
# Python 2
@nicc777
nicc777 / how-to-find-forks-of-deleted-repo.md
Created August 17, 2023 04:21 — forked from rjeczalik/how-to-find-forks-of-deleted-repo.md
How to find forks of a deleted repository?
@nicc777
nicc777 / README.md
Last active August 9, 2023 12:50
AWS Service Quotas

A simple way to get AWS Service Quotas using Python

Managing Gists Locally

by Danny Quah, May 2020 (revised Jan 2022)

Through the Embed instruction or plugin, Gist snippets on GitHub can conveniently provide posts on Medium, WordPress, and elsewhere supplementary information (lines of code, images, Markdown-created tables, and so on). But while Gist snippets on GitHub can be managed directly via browser or through something like [Gisto][], a user might also wish to manipulate them offline. This last is for many of the same reasons that a user seeks to clone a git repo to their local filesystem, modify it locally, and then only subsequently push changes back up to GitHub.

Here's how to do this:

Create the gist on GitHub and then clone it to your local filesystem: