Skip to content

Instantly share code, notes, and snippets.

@twolfson
twolfson / .gitconfig
Last active May 21, 2024 07:24
Proof of concept to explore merge conflict resolution with SOPS encoded files for https://github.com/mozilla/sops/issues/52
[mergetool "sops-mergetool"]
cmd = ./sops-mergetool.sh "$BASE" "$LOCAL" "$REMOTE" "$MERGED"

Webhooks vs Polling

What are webhooks, and why should you be using them? A webhook is a way to deliver real-time data to applications. Unlike traditional APIs where you need to poll for data frequently in order to get quasi real-time information, webhooks send data immediately.

You can think about webhooks like push notifications on your mobile phone. Rather than burning up the battery on your phone fetching information (polling) from applications to get updates, push notifications (webhooks) automatically send data based on event triggers. And just like push notifications, webhooks are less resource-intensive.

How Do Webhooks Work?

A webhook is an HTTP request (typically a POST sent to a pre-defined callback URI, where the server application is configured to handle the request on that URI. In many cases, webhooks are triggered by stimulus events, making them a faster and more efficient met

Kubectl plugin

This plugin adds completion for the Kubernetes cluster manager, as well as some aliases for common kubectl commands.

To use it, add kubectl to the plugins array in your zshrc file:

plugins=(... kubectl)
@greenhat
greenhat / postgresql.yml
Created February 7, 2016 16:58
Ansible playbook for PostgreSQL setup
---
- name: install PostgreSQL
apt: pkg={{ item }} update_cache=yes state=present
sudo: yes
tags: postgres
with_items:
- postgresql-{{ postgresql_version }}
- postgresql-client-{{ postgresql_version }}
- postgresql-contrib-{{ postgresql_version }}
- libpq-dev
@MartinEesmaa
MartinEesmaa / youtube_formats.md
Last active May 21, 2024 07:18 — forked from AgentOak/youtube_formats.md
Youtube Format IDs

Note: This is all almost full YouTube ID informations. Original owner goes to AgentOak, modified version by Martin Eesmaa.

See the credits and also special thanks in below.

Last updated: April 2024

Also known as itag or format codes and way back they could be specified with the fmt parameter (e.g. &fmt=22). Depending on the age and/or popularity of the video, not all formats will be available.

DASH video

@albertzsigovits
albertzsigovits / maps.txt
Last active May 21, 2024 07:18
Cyber Attack Maps
# Cyber attack maps:
####################
Akamai https://www.akamai.com/us/en/solutions/intelligent-platform/visualizing-akamai/real-time-web-monitor.jsp
Arbor Networks https://www.digitalattackmap.com
Bitdefender https://threatmap.bitdefender.com
BlueLiv https://community.blueliv.com/map
Cisco Talos https://www.talosintelligence.com
Checkpoint https://threatmap.checkpoint.com
Deutsche Telekom https://sicherheitstacho.eu/start/main
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 21, 2024 07:12
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
@molotovbliss
molotovbliss / create-order.php
Created May 2, 2016 11:35
Magento Orders Import/Export
<?php
require_once '../app/Mage.php';
Mage::app();
$id=1; // get Customer Id
$customer = Mage::getModel('customer/customer')->load($id);
$transaction = Mage::getModel('core/resource_transaction');
$storeId = $customer->getStoreId();
@umputun
umputun / safari-summary.sh
Last active May 21, 2024 07:06
Raycast script for Safari's page summary
#!/bin/sh
# @raycast.schemaVersion 1
# @raycast.title Summarize Safari page
# @raycast.mode fullOutput
#
# Optional parameters:
# @raycast.icon ✨
#
# @raycast.packageName Things