Skip to content

Instantly share code, notes, and snippets.

Paul Ciarlo paulyc

Block or report user

Report or block paulyc

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@paulyc
paulyc / sendRawEth.c
Last active Sep 17, 2019 — forked from austinmarton/sendRawEth.c
Send a raw Ethernet frame in Linux
View sendRawEth.c
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>
@paulyc
paulyc / goes16-rtlsdr.md
Created Jul 23, 2019 — forked from lxe/goes16-rtlsdr.md
Receive GOES-16 and GOES-17 Images with a Raspberry Pi and RTL-SDR dongle
View goes16-rtlsdr.md
@paulyc
paulyc / root-ro
Created Jun 24, 2019 — forked from kidapu/root-ro
Read-only Root-FS with overlayfs for Raspian
View root-ro
#!/bin/sh
#
# Read-only Root-FS for Raspian
#
# Modified 2016 by Stefan Bonfert to make it compatible with Raspbian
# Jessie (vanilla).
#
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with
# overlayfs integrated in Linux Kernel >= 3.18.
#
@paulyc
paulyc / root-ro
Created Jun 24, 2019 — forked from sbonfert/root-ro
Read-only Root-FS with overlayfs for Raspian
View root-ro
#!/bin/sh
#
# Read-only Root-FS for Raspian
#
# Modified 2016 by Stefan Bonfert to make it compatible with Raspbian
# Jessie (vanilla).
#
# Modified 2015 by Pascal Rosin to work on raspian-ua-netinst with
# overlayfs integrated in Linux Kernel >= 3.18.
#
@paulyc
paulyc / moonobject.js
Created Jun 17, 2019 — forked from L-A/moonobject.js
Moon phase calculation
View moonobject.js
var MoonInfo = function(day, month, year) {
var n0 = parseInt( "0" );
var f0 = parseFloat( "0.0" );
var AG = f0; // Moon's age
var DI = f0; // Moon's distance in earth radii
var LA = f0; // Moon's ecliptic latitude
var LO = f0; // Moon's ecliptic longitude
var Phase = " ";
var Zodiac = " ";
@paulyc
paulyc / single_p_multi_c_buffer.c
Created Jun 7, 2019 — forked from s8sg/single_p_multi_c_buffer.c
A blazing fast single producer multiple consumer lockless queue
View single_p_multi_c_buffer.c
/* NOTE: The design decision of the req pool is tuned to get the
* best possible performance. Below point describes
* the design decisions:
* >> reqpool is a buffer queue where the producer adds at the start
* and consumers consume from the end
* >> it is strictly one consumer and multiple producers queue
* >> It is unbounded queue and avoids any resource allocation on heap
* >> It is lockless and use atomic operation to avoid race condition
* for consumers
*/
@paulyc
paulyc / journalctl_enable_persistent_storage.md
Created Jun 4, 2019 — forked from JPvRiel/journalctl_enable_persistent_storage.md
Enable persistent storage for the systemd journal log
View journalctl_enable_persistent_storage.md

Enable persistent storage for the systemd journal log

Overview

The assumed default setting in /etc/systemd/journald.conf is Storage=auto which implies that systemd journaling will only persist the journal if the expected storage location is available. Otherwise, the journal data is stored in memory and lost between reboots. On Ubuntu 16.04, /var/log/journal does not exist by default. Create it to keep and query events from previous boots.

Considerations:

  • Syslog still provides the persistant log records for Ubuntu 16.04, so enabling persistant systemd journal logging does cause a level of duplicaiton.
  • There are sane defaults:
@paulyc
paulyc / full-disk-encryption-arch-uefi.md
Created May 25, 2019 — forked from huntrar/full-disk-encryption-arch-uefi.md
Arch Linux Full-Disk Encryption Installation Guide [Encrypted Boot, UEFI, NVMe, Evil Maid]
View full-disk-encryption-arch-uefi.md

Arch Linux Full-Disk Encryption Installation Guide

This guide provides instructions for an Arch Linux installation featuring full-disk encryption via LVM on LUKS and an encrypted boot partition (GRUB) for UEFI systems.

Following the main installation are further instructions to harden against Evil Maid attacks via UEFI Secure Boot custom key enrollment and self-signed kernel and bootloader.

Preface

You will find most of this information pulled from the Arch Wiki and other resources linked thereof.

Note: The system was installed on an NVMe SSD, substitute /dev/nvme0nX with /dev/sdX or your device as needed.

@paulyc
paulyc / wl_monitor.sh
Created May 18, 2019 — forked from mkaminsky11/wl_monitor.sh
Enables monitor mode for wl driver(Broadcom)
View wl_monitor.sh
#!/bin/sh
# so, by default, monitoring and injection cannot be used with Broadcom wl wifi drivers (such as those for Macs)
# this makes it impossible to do stuff like crack wifi passwords with aircrack-ng
# fortunately, there is a solution burried in https://www.broadcom.com/docs/linux_sta/README.txt
echo 1 > /proc/brcm_monitor0 #enables monitor mode. That's it!
# prism0 is now like "mon0" (monitor mode)
View Makefile
all: alfa.pdf
alfa.pdf: alfa.latex
latexmk -pdf $<
alfa.png: alfa.pdf
convert -density 150 -flatten $< $@
clean: alfa.latex
latexmk -CA $<
You can’t perform that action at this time.