Skip to content

Instantly share code, notes, and snippets.

View Ketouem's full-sized avatar

Cyril Thomas Ketouem

View GitHub Profile
@bskim45
bskim45 / APIGateway.md
Last active March 10, 2023 15:41
CloudWatch Logs Insights query for API Gateway

Req id:

parse @message '(*) *' as reqId, message
| filter reqId like "c19dd3fc-5f27-11e9-a823-930d231e2ab8"
| sort @timestamp asc
| limit 50

Status code:

@earljon
earljon / aws_route53_delete.sh
Created August 15, 2017 08:58
Delete a Route 53 Record Set in AWS CLI
#!/bin/sh
# NOTE:
# Make sure that the value of Name, Type, TTL are the same with your DNS Record Set
HOSTED_ZONE_ID=<YOUR_HOSTED_ZONE_ID>
RESOURCE_VALUE=<YOUR_DNS_RESOURCE_VALUE-ex:IP or dns>
DNS_NAME=<YOUR_DNS_NAME-ex: subdomain.domain.com>
RECORD_TYPE=<DNS_RECORD_TYPE-ex: A, CNAME>
TTL=<TTL_VALUE>
# General options
set -g default-terminal "xterm-256color"
# Ring the bell if any background window rang a bell
set -g bell-action any
# Watch for activity in background windows
setw -g monitor-activity on
# pass through xterm keys
@HyperBrain
HyperBrain / lifecycle-cheat-sheet.md
Last active March 20, 2024 00:17
Serverless Lifecycle Cheat Sheet

Serverless plugin author's cheat sheet

This cheat sheet provides a detailed overview of the exposed lifecycle events and available commands (and entrypoints) of the Serverless framework, that can be hooked by plugins (internal and external ones). The document is structured by the commands invoked by the user.

Lifecycle events are shown as the globally available outer events (all providers) and sub lifecycle events that are provider specific in the called order. Currently only the AWS provider is shown. If you have information about the other provider,

@yossorion
yossorion / what-i-wish-id-known-about-equity-before-joining-a-unicorn.md
Last active April 7, 2024 22:55
What I Wish I'd Known About Equity Before Joining A Unicorn

What I Wish I'd Known About Equity Before Joining A Unicorn

Disclaimer: This piece is written anonymously. The names of a few particular companies are mentioned, but as common examples only.

This is a short write-up on things that I wish I'd known and considered before joining a private company (aka startup, aka unicorn in some cases). I'm not trying to make the case that you should never join a private company, but the power imbalance between founder and employee is extreme, and that potential candidates would

# CM is dead, long live LineageOS
# Last update: 2017-05-08
# Initial state
Unlocked bootloader, any recovery, any rom, root enabled, TitaniumBackup installed
# Available documentation
LineageOS vanilla (official) https://forum.xda-developers.com/oneplus-one/orig-development/official-lineageos-14-1-oneplus-one-t3543489
LineageOS changelog (official) https://www.lineageoslog.com/14.1/bacon
@brenopolanski
brenopolanski / npm-list-globally.md
Created November 1, 2016 19:34
Listing globally installed NPM packages and version
npm list -g --depth=0
# Here I will keep a reminder of the steps to full wipe a OnePlus One device running CyanogenOS/CyanogenMod
# This is especially interesting on encrypted devices where I suspect partitions might get crippled over time
# Note: this guide assumes that you are already running the latest CyanogenOS version at the beginning (currently ZNH2KAS2X1).
# If not, dirty-upgrade to the latest version by flashing the update zip file from recovery and start from there.
# I will also assume that the current directory is the one where all the downloads are stored
# Step 0 : necessary stuff
# (http://forum.xda-developers.com/oneplus-one/general/official-cm11s-roms-ota-updates-t2906746)
# - CyanogenOS 13.1.1 (ZNH2KAS2X1) flashable zip (https://www.androidfilehost.com/?fid=24591000424953697) [cm-13.1.1-ZNH2KAS2X1-bacon-signed.zip]
# - CyanogenOS 13.1.1 (ZNH2KAS2X1) fastboot files to extract stock recovery (https://www.androidfilehost.com/?fid=24591000424953703) [cm-13.1.1-ZNH2KAS2X1-bacon-signed-fastboot.zip]
@mikefromit
mikefromit / glog.md
Last active September 5, 2016 23:09
Google style logging

logging.py

def setup_logging():
    """Setup Google-style logging

    From: https://github.com/twitter/commons/blob/master/src/python/twitter/common/log/formatters/glog.py
    """
    fmt = '%(levelletter)s%(asctime)s.%(msecs).03d %(process)d %(filename)s:%(lineno)d] %(message)s'
@timotgl
timotgl / uninstall-razer-synapse.sh
Last active April 24, 2024 15:20
How to fully uninstall Razer Synapse 2 on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra) without using Razer's official uninstall tool
# How to uninstall Razer Synapse 2 ( https://www.razerzone.com/synapse-2 )
# on OS X (10.11-10.13) (El Capitan, Sierra, High Sierra)
# without using Razer's official uninstall tool.
# Tested on OS X 10.11.5 in July 2016.
# Edited with additional steps for later OS X versions,
# contributed by commenters on this gist.
# Step 1: In your terminal: stop and remove launch agents
launchctl remove com.razer.rzupdater