Skip to content

Instantly share code, notes, and snippets.

@asukakenji
asukakenji / go-stdlib-interface-selected.md
Last active April 30, 2024 13:54
Go (Golang) Standard Library Interfaces (Selected)

Go (Golang) Standard Library Interfaces (Selected)

This is not an exhaustive list of all interfaces in Go's standard library. I only list those I think are important. Interfaces defined in frequently used packages (like io, fmt) are included. Interfaces that have significant importance are also included.

All of the following information is based on go version go1.8.3 darwin/amd64.

@jl
jl / pkg-config-mac.md
Created February 20, 2016 05:40
Installing pkg-config from source on OS X
@tbaddade
tbaddade / a11y-list.md
Last active April 30, 2024 13:53
Sammlung für Barrierefreiheit
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active April 30, 2024 13:52
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@invictus-ir
invictus-ir / CloudTrail.csv
Last active April 30, 2024 13:52
An overview of CloudTrail events that are interesting from an Incident Response perspective
We can make this file beautiful and searchable if this error is corrected: It looks like row 8 should actually have 10 columns, instead of 9. in line 7.
"Initial Access","Execution","Persistence","Privilege Escalation","Defense Evasion","Credential Access","Discovery","Lateral Movement","Exfiltration","Impact"
ConsoleLogin,StartInstance,CreateAccessKey,CreateGroup,StopLogging,GetSecretValue,ListUsers,AssumeRole,CreateSnapShot,PutBucketVersioning
PasswordRecoveryRequested,StartInstances,CreateUser,CreateRole,DeleteTrail,GetPasswordData,ListRoles,SwitchRole,ModifySnapshotAttributes ,RunInstances
,Invoke,CreateNetworkAclEntry,UpdateAccessKey,UpdateTrail,RequestCertificate,ListIdentities,,ModifyImageAttribute,DeleteAccountPublicAccessBlock
,SendCommand,CreateRoute,PutGroupPolicy,PutEventSelectors,UpdateAssumeRolePolicy,ListAccessKeys,,SharedSnapshotCopyInitiated,
,,CreateLoginProfile,PutRolePolicy,DeleteFlowLogs,,ListServiceQuotas,,SharedSnapshotVolumeCreated,
,,AuthorizeSecurityGroupEgress,PutUserPolicy,DeleteDetector,,ListInstanceProfiles,,ModifyDBSnapshotAttribute,
,,AuthorizeSecurityGroupIngress,AddRoleToInstanceProfile,DeleteMembers,,ListBuckets,,PutBucketP
@natefoo
natefoo / 00README.md
Last active April 30, 2024 13:50
Linux Distribution Detection

Distribution Detection

I am working on adding support for building and distributing (via PyPI) Python Wheels with C Extensions to the Python wheel and pip packages. The discussion on Distutils-SIG continues, but I believe it is fairly certain that some effort to correctly identify Linux distributions will need to be made. I've begun efforts to add this support to wheel.

How you can help

If you have a Linux distribution or version of a listed distribution not in this gist, or one of the ones I have not directly verified, I could use the following:

  • The contents of /etc/os-release, if it exists
@pete-murphy
pete-murphy / error-collecting.md
Last active April 30, 2024 13:50
Error collecting

Often we want to iterate through a collection of items, performing some effect for each item. This means we want some function that looks like

(a -> f b) -> t a -> result

where a -> f b is our effectful computation, t a is our collection (of as) and result could take a few different shapes depending on the requirements of our program, especially in the common case when the effect f encapsulates some notion of failure (like TaskEither in fp-ts, or anything with ExceptT in its stack in Haskell).

[!TIP]

@pietrodn
pietrodn / mavping.py
Created June 2, 2020 19:53
Tool to measure the latency in MAVLink connections
import copy
import logging
import math
import time
from typing import List
import argparse
import dronekit
from pymavlink.dialects.v20.common import MAVLink_timesync_message
@greird
greird / slack-files-downloader.sh
Last active April 30, 2024 13:49
Download all files from a Slack workspace export folder.
#!/bin/bash
#
# This script will browse a Slack export folder and download all files in a new /export folder
#
# HOW TO:
# 1. As a Workspace admin, download an export of your Slack history (https://www.slack.com/services/export)
# 2. Make sure you have jq installed (https://stedolan.github.io/jq/)
# 3. Place this file at the root of your Slack export folder, next to channels.json
# 4. Run `bash slack-files-downloader.sh` in your terminal
#
@dreness
dreness / list_launchd_notifications.sh
Created October 14, 2023 13:14
LaunchEvents -> com.apple.notifyd.matching
find /System/Library/LaunchDaemons /System/Library/LaunchAgents -name "*.plist" \
| while read p ; do plutil -convert json -o - ${p} \
| jq -r ' .. | objects | with_entries(select(.key == "Notification")) | select(. != {}).Notification'
done | sort -u > ~/Desktop/all-launchd-notifications.txt