Skip to content

Instantly share code, notes, and snippets.

View mancubus77's full-sized avatar
🇦🇺

Mancubus mancubus77

🇦🇺
  • Just a small software company
  • Ku-ring-gai
View GitHub Profile
@mancubus77
mancubus77 / gist:8d8e7009682094a5bfc5ba044c439f69
Created June 28, 2017 23:16
run unetbootin in LXDE or XFCE
sudo QT_X11_NO_MITSHM=1 unetbootin
@mancubus77
mancubus77 / gist:c52959b7d2138512c8b2c8ce4f8224e1
Created July 23, 2017 11:05
godoc installation in ubuntu
sudo apt-get install golang-go.tools
https://stackoverflow.com/questions/17000548/how-to-make-godoc-command-work-on-my-system/23573335#23573335
@mancubus77
mancubus77 / elasticsearch-cheatsheet.txt
Last active July 29, 2017 07:39 — forked from stephen-puiszis/elasticsearch-cheatsheet.txt
Elasticsearch Cheatsheet - An Overview of Commonly Used Elasticsearch API Endpoints and What They Do
# Elasticsearch Cheatsheet - an overview of commonly used Elasticsearch API commands
# Bulk actions:
# Delete all indexes via pattern
for index in $(curl -XGET esmaster:9200/_cat/indices | awk ‘/pattern/ {print $3}’); do curl -XDELETE esmaster:9200/$index?master_timeout=120s; done
# cat paths
/_cat/allocation
# enable admin access to clusdter
oadm policy add-cluster-role-to-user cluster-admin admin --config=/etc/origin/master/admin.kubeconfig
# give rights to container
oadm policy add-scc-to-user anyuid -z default
@mancubus77
mancubus77 / gist:7bf4344e6e454a0f754a846b23dde838
Last active August 12, 2017 04:01
Increase mysql max table size
You should adjust the way you make and load the table
CREATE TABLE sns_memory SELECT * FROM sns WHERE 1=2;
ALTER TABLE sns_memory ENGINE=MEMORY;
INSERT INTO sns_memory SELECT * FROM sns;
DROP TABLE sns;
ALTER TABLE sns_memory RENAME sns;
Enable huawei modem
usb_modeswitch -v 12d1 -p14fe -V 12d1 -P 1506 -M "55534243123456780000000000000011063000000100010000000000000000"
WV Dial config
[Dialer Defaults]
Init1 = ATZ
Init2 = ATE1
Init3 = AT+CGDCONT=1,"IP","connect"
Stupid Mode = 1
MessageEndPoint = "0x01"
KEYBINDINGS
byobu keybindings can be user defined in /usr/share/byobu/keybindings/ (or within .screenrc if byobu-export was used). The common key bindings
are:
F2 - Create a new window
F3 - Move to previous window
F4 - Move to next window
@mancubus77
mancubus77 / tcp_flags.txt
Created November 10, 2017 00:55 — forked from tuxfight3r/tcp_flags.txt
tcpdump - reading tcp flags
##TCP FLAGS##
Unskilled Attackers Pester Real Security Folks
==============================================
TCPDUMP FLAGS
Unskilled = URG = (Not Displayed in Flag Field, Displayed elsewhere)
Attackers = ACK = (Not Displayed in Flag Field, Displayed elsewhere)
Pester = PSH = [P] (Push Data)
Real = RST = [R] (Reset Connection)
Security = SYN = [S] (Start Connection)
8.2.3. HTTP log format
----------------------
The HTTP format is the most complete and the best suited for HTTP proxies. It
is enabled by when "option httplog" is specified in the frontend. It provides
the same level of information as the TCP format with additional features which
are specific to the HTTP protocol. Just like the TCP format, the log is usually
emitted at the end of the session, unless "option logasap" is specified, which
generally only makes sense for download sites. A session which matches the
"monitor" rules will never logged. It is also possible not to log sessions for
@mancubus77
mancubus77 / gist:3f6eff5ab5b1b0ae20d8e8fca8d4f9da
Last active November 27, 2024 05:50
HAProxy TCP log format (1.7)
8.2.2. TCP log format
---------------------
The TCP format is used when "option tcplog" is specified in the frontend, and
is the recommended format for pure TCP proxies. It provides a lot of precious
information for troubleshooting. Since this format includes timers and byte
counts, the log is normally emitted at the end of the session. It can be
emitted earlier if "option logasap" is specified, which makes sense in most
environments with long sessions such as remote terminals. Sessions which match
the "monitor" rules are never logged. It is also possible not to emit logs for