Skip to content

Instantly share code, notes, and snippets.

### Keybase proof
I hereby claim:
* I am diversified1 on github.
* I am billy10 (https://keybase.io/billy10) on keybase.
* I have a public key ASC1ML7wUvG6SbQtAxU8HSR060qsngDFK7MhtlvjIsokKwo
To claim this, I am signing this object:
@Diversified1
Diversified1 / ubuntu-hardening.md
Created August 17, 2020 18:16 — forked from lokhman/ubuntu-hardening.md
List of things for hardening Ubuntu

System Updates

http://bookofzeus.com/harden-ubuntu/initial-setup/system-updates/

Keeping the system updated is vital before starting anything on your system. This will prevent people to use known vulnerabilities to enter in your system.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get autoremove
sudo apt-get autoclean

How to pass the OSCP

  1. Recon
  2. Find vuln
  3. Exploit
  4. Escalate
  5. Document it

Time yourself

@Diversified1
Diversified1 / Playground.hs
Last active September 18, 2020 22:02
Plutus Playground Smart Contract
-- | Crowdfunding contract implemented using the [[Plutus]] interface.
-- This is the fully parallel version that collects all contributions
-- in a single transaction.
--
-- Note [Transactions in the crowdfunding campaign] explains the structure of
-- this contract on the blockchain.
import qualified Language.PlutusTx as PlutusTx
import qualified Ledger.Interval as Interval
import Ledger.Slot (SlotRange)
import qualified Ledger.Slot as Slot
@kangtastic
kangtastic / att6rd.sh
Last active November 1, 2020 20:28
AT&T 6rd script for Linux routers
#!/bin/bash
# Create a 6rd tunnel on a Linux router using AT&T U-Verse Fiber/DSL.
#
# Only creates a tunnel and sets up a default route. IPv6 connectivity for LAN
# clients requires, at minimum, sending Router Advertisements (with radvd/
# dnsmasq) to the LAN interface and enabling IPv6 forwarding in the kernel.
# IPv6 firewalling with ip6tables is also a very good idea.
#
# Hat tip VictorLowther: https://gist.github.com/VictorLowther/2969270
#
@fjiang423
fjiang423 / bypass_att_fiber_modem_ubiquiti_usg.md
Last active March 28, 2021 02:33
Bypassing AT&T Gigabit Fiber Modem for USG (& Pro)
@jrgutier
jrgutier / eap_proxy_edgeos_ipv6.sh
Created March 17, 2018 00:48
Get ipv6 working with the default eap_proxy interfaces on EdgeOS
#!/bin/sh
PREAMBLE="\x19\x00\x00\x02\x00\x00\x0d\xe9\x30\x30\x44\x30\x39\x45\x2d" # For Pace 5268AC
SERIAL=00000A000000
WAN=eth0.0
LAN=eth1
to_shellcode()
{
counter=0
@anthonytxie
anthonytxie / hodl20.py
Created March 24, 2018 21:01
Hodl 20 Rebalancing Algorithm
def calc_allocations(self, date, quantity, cap):
"""Figure out ideal allocations for a given date"""
# {
# coin_name: (percent_allocation, data)
# }
top_market = self.get_top_market(date, quantity)
total_cap = sum([coin.market_cap for coin in top_market])
allocations = [{
@ilap
ilap / shelley_staking_gen.md
Last active November 24, 2022 03:01
Extracting Pool Staking keys from Daedalus/Yoroi wallet

Intorduction

DISCLAIMER: NO WARRANTY EXPRESSED OR IMPLIED. USE AT YOUR OWN RISK

UPDATED: 14:08am AEST 29/Sept/2020, The IDX was incorrectly used. Fixed now

There are two keypairs that are required to register a pool:

  1. reward account (costs and rewards) and
  2. owner stake (pledge) keypair.
@gavinandresen
gavinandresen / BlockPropagation.md
Last active March 14, 2023 09:45
O(1) block propagation

O(1) Block Propagation

The problem

Bitcoin miners want their newly-found blocks to propagate across the network as quickly as possible, because every millisecond of delay increases the chances that another block, found at about the same time, wins the "block race."