Skip to content

Instantly share code, notes, and snippets.

@jagrosh
jagrosh / Github Webhook Tutorial.md
Last active January 1, 2025 19:15
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@awesome-doge
awesome-doge / The TON Blockchain is based on PoS consensus.md
Created May 6, 2022 08:02
The TON Blockchain is based on PoS consensus.md

The TON Blockchain is based on PoS consensus

For everyone that has come to know the TON blockchain, most will probably know that TON is mineable. However, the TON blockchain was never a PoW consensus algorithm. The TON blockchain is actually a consensus algorithm based on PoS and implements sharding expansion. Therefore, the TON blockchain has the characteristics of tightly-coupled sharding that PoW does not have.

The TON blockchain is essentially a PoS blockchain, and the most important PoS infrastructure is the validator. Currently, there are more than 100 validators in the world, and most are private validators. To assist in the health of the TON blockchain, TON holders can pledge their TON to validators and get TON PoS staking rewards as additional income.

Currently, the TON PoS APY reward is about 13%. TonStake.com, as an example, allows users to stake their TON to validators through Centralized validator service where they can earn an additional 13% TON after one year a

@eonarheim
eonarheim / minkowski.ts
Created January 1, 2025 19:11 — forked from kfalicov/minkowski.ts
A messy first-attempt approach at creating swept/shapecast AABB colliders in excalibur
import {
vec,
Vector,
} from 'excalibur';
/**
* sweeps a polygon p along another polygon q by using minkowski to sum the two polygons.
* @param p the first polygon
* @param q the second polygon
*/
@dglewis
dglewis / check_contributions.sh
Last active January 1, 2025 19:09
check_contributions.sh + config.sh: Scans local Git repos for commits matching author/repo patterns. See [Usage Instructions](usage.md) for details.
#!/usr/bin/env bash
# Must set variables:
# REPO_DIR
# AUTHOR_PATTERN
# REPO_PATTERN
source ./config.sh
cd "$REPO_DIR" || exit
@ohjho
ohjho / remove_ipynb_checkpoints.sh
Last active January 1, 2025 19:09
How to remove .ipynb_checkpoints from Git Repo
# to remove the file on git without deleting from local
# use -> git rm --cached
find . -name .ipynb_checkpoints -print0 | xargs -0 git rm -r --ignore-unmatch
echo .ipynb_checkpoints >> .gitignore
@swarminglogic
swarminglogic / watchfile.sh
Last active January 1, 2025 19:07
watchfile - monitor file(s) and execute a command when files are changed
#!/bin/bash
version=1.0.1
versionDate="2014-02-14"
function showHelp() {
echo "watchfile - monitor file(s)/command and perform action when changed
Possible ways of usage
----------------------------------------
@consti
consti / hosts
Last active January 1, 2025 19:04
/etc/hosts to block shock sites etc.
# This hosts file is brought to you by Dan Pollock and can be found at
# http://someonewhocares.org/hosts/
# You are free to copy and distribute this file for non-commercial uses,
# as long the original URL and attribution is included.
#<localhost>
127.0.0.1 localhost
127.0.0.1 localhost.localdomain
255.255.255.255 broadcasthost
::1 localhost
@LukeMathWalker
LukeMathWalker / audit.yml
Last active January 1, 2025 19:03
GitHub Actions - Rust setup
name: Security audit
on:
schedule:
- cron: '0 0 * * *'
push:
paths:
- '**/Cargo.toml'
- '**/Cargo.lock'
jobs:
security_audit:
@Vigrond
Vigrond / jellyfinchromecast.md
Last active January 1, 2025 19:02
Jellyfin with Chromecast
@laurivosandi
laurivosandi / uwebsockets.py
Created August 18, 2017 10:53
Websockets client for MicroPython
"""
Websockets client for micropython
Based very heavily on
https://github.com/aaugustin/websockets/blob/master/websockets/client.py
"""
import ubinascii as binascii
import urandom as random
import ure as re