Skip to content

Instantly share code, notes, and snippets.

View layertwo's full-sized avatar

Lucas Messenger layertwo

View GitHub Profile
@ZoranStojsavljevic
ZoranStojsavljevic / Setting the Marvell mv88e6190 switch with i.MX6 via rmii interface [MAC to MAC layer]
Last active July 27, 2023 05:20
Setting the Marvell mv88e6190 switch with i.MX6 via rgmii interface [MAC to MAC layer]
# Setting the Marvell mv88e6190 switch with i.MX6 via rgmii interface [MAC to MAC layer]
## [1] Adding TxC and RxC clock skew
Please, do read the following page to get familiar with some required setups for the mv88e6190.
https://ethernetfmc.com/rgmii-interface-timing-considerations/
## [2] Device Tree Source
&fec {
@sakalajuraj
sakalajuraj / auditd.conf
Last active May 21, 2024 13:51
Logstash configuration for auditd messages received via syslog
# Content of the file /etc/logstash/conf.d/auditd.conf
# Tested on the CentOS 7 auditspd logs forwarded to logstash via rsyslog
input {
syslog {
type => AUDITD
port => xxxx
host => "xxx.xxx.xxx.xxx"
}
}
@fginter
fginter / gist:2d4662faeef79acdb772
Last active August 31, 2020 06:55
Super-fast sort - uniq for ngram counting

The problem:

  • 1.3TB data with 5B lines in a 72GB .gz file
  • Need to sort the lines and get a count for each unique line, basically a sort | uniq -c
  • Have a machine with 24 cores, 128GB of memory, but not 1.3TB of free disk space
  • Solution: sort | uniq -c with lots of non-standard options and pigz to take care of compression

Here's the sort part, uniq I used as usual.

INPUT=$1

OUTPUT=${INPUT%.gz}.sorted.gz