Skip to content

Instantly share code, notes, and snippets.

View pol's full-sized avatar

pol llovet pol

View GitHub Profile
@pol
pol / regexCheatsheet.js
Created February 1, 2020 01:59 — forked from sarthology/regexCheatsheet.js
A regex cheatsheet 👩🏻‍💻 (by Catherine)
let regex;
/* matching a specific string */
regex = /hello/; // looks for the string between the forward slashes (case-sensitive)... matches "hello", "hello123", "123hello123", "123hello"; doesn't match for "hell0", "Hello"
regex = /hello/i; // looks for the string between the forward slashes (case-insensitive)... matches "hello", "HelLo", "123HelLO"
regex = /hello/g; // looks for multiple occurrences of string between the forward slashes...
/* wildcards */
regex = /h.llo/; // the "." matches any one character other than a new line character... matches "hello", "hallo" but not "h\nllo"
regex = /h.*llo/; // the "*" matches any character(s) zero or more times... matches "hello", "heeeeeello", "hllo", "hwarwareallo"
@pol
pol / postmortem.md
Created May 21, 2019 13:49 — forked from mlafeldt/postmortem.md
Example Postmortem from SRE book, pp. 487-491

Shakespeare Sonnet++ Postmortem (incident #465)

Date

2015-10-21

Authors

  • jennifer
  • martym
@pol
pol / etc-hosts-on-win.md
Last active July 21, 2018 00:16 — forked from zenorocha/etc-hosts-on-win.md
/etc/hosts on Windows

How to edit your hosts file

notepad

For Windows 10 and 8
  1. Press the Windows key.
  2. Type Notepad in the search field.
  3. In the search results, right-click Notepad and select Run as administrator.
  4. From Notepad, open the following file: c:\Windows\System32\Drivers\etc\hosts
root@app-server-b-3 ~ # lsof | grep deleted | awk '{print $1}' | sort | uniq -c
8 consul
51772 log-couri
root@app-server-b-3 ~ # lsof | grep deleted | awk '{print $10}' | sort | uniq -c
1433 (deleted)
46 /mnt/app/myapp/etc/sv/resque-worker-statused,high,highnetwork,medhigh,medium,long_medium-10/log/main/@400000005a1f2f663b201db4.s
46 /mnt/app/myapp/etc/sv/resque-worker-statused,high,highnetwork,medhigh,medium,long_medium-10/log/main/@400000005a1f35c7139217fc.s
46 /mnt/app/myapp/etc/sv/resque-worker-statused,high,highnetwork,medhigh,medium,long_medium-10/log/main/@400000005a1f3a8716e90b2c.s
46 /mnt/app/myapp/etc/sv/resque-worker-statused,high,highnetwork,medhigh,medium,long_medium-10/log/main/@400000005a1f40183699ce5c.s
46 /mnt/app/myapp/etc/sv/resque-worker-statused,high,highnetwork,medhigh,medium,long_medium-10/log/main/@400000005a1f46c015870a2c.s
@pol
pol / gist:ef1a786c258c4751d90c0eb2afad706a
Created November 8, 2017 22:12
Keybase Proof of Me.
### Keybase proof
I hereby claim:
* I am pol on github.
* I am pol (https://keybase.io/pol) on keybase.
* I have a public key whose fingerprint is 8F14 7A93 28E1 1F48 99EC 073E 89E0 D6D5 8F0F CCBE
To claim this, I am signing this object:
@pol
pol / logstash.conf.erb
Created September 19, 2017 15:20
logstash conf template
input {
tcp {
port => 5000
type => "raw-tcp"
}
courier {
transport => "tls"
port => <%= @log_courier_port %>
ssl_certificate => "<%= @log_courier_certpath %>"
ssl_key => "<%= @log_courier_keypath %>"
@pol
pol / shell output
Last active April 11, 2017 15:32
icc test compile
[easybuild@hyalite test-icc]$ module purge
[easybuild@hyalite test-icc]$ module load icc/2016.3.210-GCC-5.4.0-2.26
[easybuild@hyalite test-icc]$ module list
Currently Loaded Modulefiles:
1) GCCcore/5.4.0 2) binutils/2.26-GCCcore-5.4.0 3) icc/2016.3.210-GCC-5.4.0-2.26
[easybuild@hyalite test-icc]$ ls
hello.c
[easybuild@hyalite test-icc]$ cat hello.c
/* Hello World program */
@pol
pol / config.log
Created April 7, 2017 15:56
BigReqsProto config.log from easybuild X11 failure.
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
It was created by BigReqsProto configure 1.1.2, which was
generated by GNU Autoconf 2.68. Invocation command line was
$ ./configure --prefix=/cm/shared/hyalite/apps/eb/X11/20160819-intel-2016b
## --------- ##
## Platform. ##
@pol
pol / test.md
Last active March 24, 2017 21:44