This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
git remote add origin $(gh repo view $repo --json sshUrl --jq .sshUrl) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
curl https://raw.githubusercontent.com/ibraheemdev/modern-unix/master/README.md | grep "<a" | cut -d '"' -f 2 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
images: | |
# Try to use release-yyyyMMdd image if available. Note that release-yyyyMMdd will be removed after several months. | |
- location: "https://cloud-images.ubuntu.com/releases/22.04/release-20231010/ubuntu-22.04-server-cloudimg-arm64.img" | |
arch: "aarch64" | |
digest: "sha256:5167c1b13cb33274955e36332ecb7b14f02b71fd19a37a9c1a3a0f8a805ab8e5" | |
mounts: | |
- location: "~" | |
- location: "/tmp/lima" | |
writable: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pathlib import Path | |
from shlex import split | |
from subprocess import check_output | |
from typing import List | |
import pytest | |
def sh(cmd): | |
return check_output(split(cmd)).decode("utf-8").splitlines() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Add this to your index.js, you may want to do file $(which program) to find where | |
// the package has been installed. Also, you will need to install npm install njstrace | |
if (process.env.TRACE || false) { | |
// Generate the name of the tracefile | |
let call_argument_list = process.argv.slice(2); | |
call_argument_list.push(new Date().getTime()); | |
let trace_file_name = call_argument_list.join('-'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"os_list": [{ | |
"nominal_size": 9554, | |
"supported_hex_revisions": "2,3,4,5,6,7,8,9,d,e,f,10,11,12,14,19,1040,1041,0092,0093,2082", | |
"feature_level": 35120124, | |
"os_info": "http://downloads.raspberrypi.org/raspbian/os.json", | |
"icon": "http://downloads.raspberrypi.org/raspbian/Raspbian.png", | |
"tarballs": [ | |
"http://downloads.raspberrypi.org/raspbian/boot.tar.xz", | |
"http://downloads.raspberrypi.org/raspbian/root.tar.xz" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[tool.poetry] | |
name = "pcapfilter" | |
version = "0.1.0" | |
description = "" | |
authors = ["Nahuel Defossé <email@domain>"] | |
[tool.poetry.dependencies] | |
python = "^3.6" | |
scapy = "^2.4" | |
click = "^7.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Uses the termsvg | |
alias svgcast='termtosvg -t ${TEMPLATE:=window_frame_js} $(echo $(git rev-parse --abbrev-ref HEAD) | tr "/" "_")-$(date "+%Y-%m-%d-%H-%M").svg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Checks that binary representation is the same as int.from_bytes(..., 'big') | |
bin(int.from_bytes(ip_address('200.1.17.25').packed, 'big'))[2:] == ''.join(format(i, '08b') for i in map(int, '200.1.17.25'.split('.'))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
node n1 { | |
type router | |
model host | |
network-config { | |
hostname n1 | |
! | |
interface eth0 | |
ip address 10.0.0.10/24 | |
ipv6 address :0::10/64 | |
! |
NewerOlder