Skip to content

Instantly share code, notes, and snippets.

View zorteran's full-sized avatar

Maciej Szymczyk zorteran

View GitHub Profile
@justincampbell
justincampbell / How-to-Win-Friends-and-Influence-People.md
Created September 19, 2013 17:11
Principles of How to Win Friends and Influence People

How to Win Friends and Influence People

Fundamental Techniques in Handling People

  1. Don't criticize, condemn, or complain.
  2. Give honest and sincere appreciation.
  3. Arouse in the other person an eager want.
  4. Never show others that you are not interested in what they have to say.
@alessandroleite
alessandroleite / mcc-simulators.md
Last active October 8, 2017 21:13
MCC Simulators

Mobile Cloud Computing (MCC) Simulators

  • Green Cloud Computing - GreenCloud can be used to develop novel solutions in monitoring, resource allocation, workload scheduling as well as optimization of communication protocols and network infrastructures. It is released under the General Public License Agreement and is an extension of the well-known NS2 network simulator.
  • ns-3 - it is a discrete-event network simulator for Internet systems, targeted primarily for research and educational use. It is released under the GNU GPLv2 license, and is publicly available for research, development, and use.
  • OMNEST - OMNEST simulation software has been chosen by R&D staff, researchers and engineers worldwide to investigate scenarios and design alternatives in various wired/wireless networks, interconnection networks, queueing-based performance models and other systems. OMNEST simulations can also be embedded into your own software prod
@ibspoof
ibspoof / 11-cassandra-filter.conf
Last active January 6, 2021 12:23
Grok Patterns and configuration for Cassandra logs
filter {
if [type] == "cassandralog" {
grok {
break_on_match => true
match => {
"message" => [
"%{CASS_COMPACTION_LARGE_KEY}",
"%{CASS_SLAB_POOL_CLEANER_1}",
"%{CASS_SLAB_POOL_CLEANER_2}",
@Orbifold
Orbifold / ZeppelinPlot.py
Created November 17, 2016 07:08
Zeppelin plotly example.
# if needed, install plotly via shell like so
%sh pip install plotly
#---
%pyspark
import plotly
import numpy as np
from plotly.graph_objs import Scatter, Layout
@thbkrkr
thbkrkr / list.rb
Last active July 25, 2023 07:54
Kafka JMX MBeans list
com.sun.management:type=DiagnosticCommand
com.sun.management:type=HotSpotDiagnostic
java.lang:name=CodeCacheManager,type=MemoryManager
java.lang:name=Code Cache,type=MemoryPool
java.lang:name=Compressed Class Space,type=MemoryPool
java.lang:name=G1 Eden Space,type=MemoryPool
java.lang:name=G1 Old Generation,type=GarbageCollector
java.lang:name=G1 Old Gen,type=MemoryPool
java.lang:name=G1 Survivor Space,type=MemoryPool
java.lang:name=G1 Young Generation,type=GarbageCollector
@pavlov99
pavlov99 / haversine.scala
Created December 19, 2016 07:52
Spherical distance calcualtion based on latitude and longitude with Apache Spark
// Based on following links:
// http://andrew.hedges.name/experiments/haversine/
// http://www.movable-type.co.uk/scripts/latlong.html
df
.withColumn("a", pow(sin(toRadians($"destination_latitude" - $"origin_latitude") / 2), 2) + cos(toRadians($"origin_latitude")) * cos(toRadians($"destination_latitude")) * pow(sin(toRadians($"destination_longitude" - $"origin_longitude") / 2), 2))
.withColumn("distance", atan2(sqrt($"a"), sqrt(-$"a" + 1)) * 2 * 6371)
>>>
+--------------+-------------------+-------------+----------------+---------------+----------------+--------------------+---------------------+--------------------+------------------+
|origin_airport|destination_airport| origin_city|destination_city|origin_latitude|origin_longitude|destination_latitude|destination_longitude| a| distance|
@maprangzth
maprangzth / vip-with-keepalived.md
Last active November 2, 2022 14:58
VIP for Elasticsearch and Logstash with Keepalived

VIP for Elasticsearch and Logstash with Keepalived

Step 1: Install keepalived

# yum -y install keepalived
# chkconfig keepalived on
@dkurzaj
dkurzaj / README.md
Last active April 3, 2023 06:54
Docker compose Kafka, Zookeeper and Kafka manager

Docker compose Kafka, Zookeeper and Kafka manager

Gist inspired by this one intending to be an updated version of it : https://gist.github.com/17twenty/d619f922ab209f750630824f7c6836e3

Install

  • Create the environment variable that contains our host name (IP address) :
$ export EXPOSED_HOSTNAME=$(ip addr | grep 'state UP' -A2 | tail -n1 | awk '{print $2}' | cut -f1  -d'/')
  • Create the folders :
@fevangelou
fevangelou / Software RAID 1 setup on Ubuntu Server 20.04.md
Last active July 20, 2024 17:15
Software RAID 1 setup on Ubuntu Server 20.04 (or newer)

Looking to create a Software RAID 1 setup for your 2-disk server on Ubuntu Server 20.04?

Screen Shot 2020-06-05 at 20 55 31

Let's start with the basics: the official guide by Ubuntu (https://ubuntu.com/server/docs/install/storage) is outdated/wrong. And as of March 2021 it's possible that there's a bug as well with how the bios_grub partitions are created when using multiple disks.

Now on to the solution:

  • Select "Custom storage layout" when you reach the storage configuration step of the installer.
  • If the disks have existing partitions, click on each disk under AVAILABLE DEVICES and then select REFORMAT. This will (temporarily) wipe out the partitions.