Skip to content

Instantly share code, notes, and snippets.

View spxwnmc's full-sized avatar
💀
Pythoner

Luis Gerardo spxwnmc

💀
Pythoner
View GitHub Profile
@spxwnmc
spxwnmc / grep.md
Created April 4, 2022 03:38 — forked from bbrother92/grep.md
#bash #regex #cheatsheet #grep

GREP Options

--max-count=number of matches before stopping search
--exclude=*.txt  with -r option

Note: Lookahead and lookbehind are Perl-style regular expression elements, so you'd have to use Perl directly, or GNU grep with the -P option, which then interprets Perl regex.

grep -o pattern file.txt **shows only the matched string** 
grep -bn pattern file.txt **shows row and col**  
grep -v pattern file.txt **inversion**  
/* vim: set shiftwidth=2 tabstop=2 autoindent cindent expandtab filetype=css: */
/*!
* Base CSS for pdf2htmlEX
* Copyright 2012,2013 Lu Wang <coolwanglu@gmail.com>
* https://github.com/coolwanglu/pdf2htmlEX/blob/master/share/LICENSE
*/
/* Part 1: Web Page Layout: Free to modify, except for a few of them which are required by pdf2htmlEX.js, see the comments */
#sidebar { /* Sidebar */
position: absolute;
top: 0;
@spxwnmc
spxwnmc / hardening-pci.sh
Created August 10, 2023 01:21
hardening-pci.sh
#!/bin/bash
myhostname=$(hostname)
hostnamesindom="${myhostname%%.*}"
prompt="root@"${hostnamesindom}"#"
filename=${hostnamesindom}_bitacora_pci.txt
id-header(){
echo -e "${prompt} date" ; date
echo -e "${prompt} uname -a" ; uname -a