Skip to content

Instantly share code, notes, and snippets.

@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
--ÇALIŞMA SORGULARI
--Brazil’de bulunan müşterilerin Şirket Adı, TemsilciAdi, Adres, Şehir, Ülke bilgileri
SELECT CompanyName, ContactName, [Address],City, Country
FROM Customers
WHERE Country='Brazil'
ORDER BY CompanyName
--— Brezilya’da olmayan müşteriler
SELECT CompanyName, ContactName, [Address],City, Country
FROM Customers
declare module "vue-instantsearch" {
import Vue from "vue";
import { InstantSearch, InstantSearchOptions } from "instantsearch.js/es/types/instantsearch";
import { SearchClient } from "instantsearch.js/es/types/algoliasearch";
export interface SearchItem {
value: string;
count: number;
label: string;
isRefined: boolean;
@Mithrandir0x
Mithrandir0x / gist:3639232
Created September 5, 2012 16:15
Difference between Service, Factory and Provider in AngularJS
// Source: https://groups.google.com/forum/#!topic/angular/hVrkvaHGOfc
// jsFiddle: http://jsfiddle.net/pkozlowski_opensource/PxdSP/14/
// author: Pawel Kozlowski
var myApp = angular.module('myApp', []);
//service style, probably the simplest one
myApp.service('helloWorldFromService', function() {
this.sayHello = function() {
return "Hello, World!"