Skip to content

Instantly share code, notes, and snippets.

View mataralhawiti's full-sized avatar
:octocat:
Enjoying this beautiful life

Matar mataralhawiti

:octocat:
Enjoying this beautiful life
  • Riyadh, Saudi Arabia
View GitHub Profile
@eneko
eneko / list-of-curl-options.txt
Last active April 19, 2025 09:46
List of `curl` options
$ curl --help
Usage: curl [options...] <url>
--abstract-unix-socket <path> Connect via abstract Unix domain socket
--alt-svc <file name> Enable alt-svc with this cache file
--anyauth Pick any authentication method
-a, --append Append to target file when uploading
--basic Use HTTP Basic Authentication
--cacert <file> CA certificate to verify peer against
--capath <dir> CA directory to verify peer against
-E, --cert <certificate[:password]> Client certificate file and password
# --------------------------------------------------------------------------------------------------------------
#  Title         : Azure - Azure VM enable guest level monitoring 
#  Written by  : Marc Kean
#  Date          : December, 2017
# --------------------------------------------------------------------------------------------------------------
#
# Script to turn on guest OS level monitoring across all VMs in a subscription. This will work its way through all
# ARM based Azure VMs one by one. VMs need to be turned on, otherwise they can't be enabled. Run again over and over
@mostafa-asg
mostafa-asg / kafka-console-consumer tip1
Last active June 12, 2024 16:31
Print key of records in kafka-console-consumer
use --property print.key=true
Example : ./kafka-console-consumer.sh --bootstrap-server <BROKERS_ADDRESS> --topic <YOUR_TOPIC> --property print.key=true
@dyoung522
dyoung522 / kafka-oracle-vm-config.md
Last active April 16, 2025 01:04 — forked from vipmax/kafka install systemd.md
kafka installation with systemd
  1. Install Kafka

    cd /opt
    curl -O http://www.gtlib.gatech.edu/pub/apache/kafka/0.11.0.0/kafka_2.11-0.11.0.0.tgz
    tar xvzf kafka_2.11-0.11.0.0.tgz
    ln -s kafka_2.11-0.11.0.0/ kafka
  2. Edit /usr/lib/systemd/system/kafka-zookeeper.service

Kafka installation with systemd

0. Create kafka user

sudo adduser kafka
sudo adduser kafka sudo
su -l kafka

1. Download and Install kafka archive

@willurd
willurd / web-servers.md
Last active April 20, 2025 00:42
Big list of http static server one-liners

Each of these commands will run an ad hoc http static server in your current (or specified) directory, available at http://localhost:8000. Use this power wisely.

Discussion on reddit.

Python 2.x

$ python -m SimpleHTTPServer 8000
@yanofsky
yanofsky / LICENSE
Last active March 14, 2025 18:19
A script to download all of a user's tweets into a csv
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
@TBonnin
TBonnin / git-remove-branches
Last active May 27, 2023 14:44
Safely remove local fully merged branches
#!/bin/bash
# This has to be run from master
git checkout master
# Update our list of remotes
git fetch
git remote prune origin
# Remove local fully merged branches
@gamame
gamame / avro_rw.py
Created May 17, 2012 01:45
Python Avro Data Read Write
# Import the schema, datafile and io submodules
# from avro (easy_install avro)
from avro import schema, datafile, io
OUTFILE_NAME = 'sample.avro'
SCHEMA_STR = """{
"type": "record",
"name": "sampleAvro",
"namespace": "AVRO",