Skip to content

Instantly share code, notes, and snippets.

View faxm0dem's full-sized avatar
⌨️
Typing…

Fabien Wernli faxm0dem

⌨️
Typing…
View GitHub Profile
@SanariSan
SanariSan / readme.md
Last active November 14, 2024 04:01
Telegram HTTP bot API via CURL | Send text, photos, documents, etc.

Here are some examples on how to use Telegram bot api via CURL

Prerequisites

For getting messages in private chat with bot

  • Create a bot using @BotFather, get it's token
  • Start conversation with bot
  • Run following curl command
curl https://api.telegram.org/bot/getUpdates | grep -Po '"from":{"id":.+?,'
@Fuwn
Fuwn / README.md
Last active November 13, 2024 12:05
Windows XP All Editions Universal Product Keys Collection.

Windows XP Logo

Although Microsoft does not support Windows XP updates any more, I'm sure there are still many users using it due to their personal habits or job demands. Therefore, XP's product keys may be necessary even now. Here lies the most comprehensive list of Windows XP product keys.

The following CD keys are official and original from Microsoft, mainly used for Windows XP Professional Service Pack 2/3 VOL/VLK system images, which are the easiest ones to find on the Internet.

@nzlosh
nzlosh / nagios.xml
Created November 10, 2017 11:08
patterndb to extract key/value pairs using syslog-ng
<?xml version='1.0' encoding='UTF-8'?>
<patterndb version='5' pub_date='2017-06-15'>
<ruleset id='a0dab742fc66ad5cdf41bfd0c105f3df' name='nagios'>
<patterns>
<pattern>nagios</pattern>
<pattern>shinken</pattern>
</patterns>
<rules>
<rule provider='github.com/nzlosh' id='nagios-1' class='monitoring'>
<patterns>
@marcelog
marcelog / passing_client_ssl_certificate_options_haproxy.conf
Last active November 21, 2023 18:22
Sample haproxy configuration snippet that will pass the SSL client certificate information to your application
mode http
http-request set-header X-SSL %[ssl_fc]
http-request set-header X-SSL-Client-Cert %[ssl_fc_has_crt]
http-request set-header X-SSL-Client-Verify %[ssl_c_verify]
http-request set-header X-SSL-Client-SHA1 %{+Q}[ssl_c_sha1,hex]
http-request set-header X-SSL-Client-DN %{+Q}[ssl_c_s_dn]
http-request set-header X-SSL-Client-CN %{+Q}[ssl_c_s_dn(cn)]
http-request set-header X-SSL-Issuer %{+Q}[ssl_c_i_dn]
http-request set-header X-SSL-Client-Not-Before %{+Q}[ssl_c_notbefore]
http-request set-header X-SSL-Client-Not-After %{+Q}[ssl_c_notafter]
@jolestar
jolestar / es-recovery.sh
Created March 22, 2017 12:25
elasticsearch recovery speed up
curl -s -XGET 'localhost:9200/_cat/recovery?v'
curl -XPUT localhost:9200/_cluster/settings -d '{
"persistent" : {
"cluster.routing.allocation.node_concurrent_recoveries" : "10",
"indices.recovery.max_bytes_per_sec": "250mb",
"indices.recovery.concurrent_streams": 10
}
}'
curl -s -XGET 'localhost:9200/_cat/recovery?v'
#!/usr/bin/perl -w
#
# Uses ipmitool(1) to display a string of text on
# the front chassis display of Dell PowerEdge
# servers.
#
# Jesper Nyerup <[email protected]>
my $ipmitool = '/usr/bin/ipmitool';
@textarcana
textarcana / git-log2json.sh
Last active October 23, 2024 19:19
Convert Git logs to JSON. The first script (git-log2json.sh) is all you need, the other two files contain only optional bonus features 😀THIS GIST NOW HAS A FULL GIT REPO: https://github.com/context-driven-testing-toolkit/git-log2json
#!/usr/bin/env bash
# Use this one-liner to produce a JSON literal from the Git log:
git log \
--pretty=format:'{%n "commit": "%H",%n "author": "%aN <%aE>",%n "date": "%ad",%n "message": "%f"%n},' \
$@ | \
perl -pe 'BEGIN{print "["}; END{print "]\n"}' | \
perl -pe 's/},]/}]/'