Skip to content

Instantly share code, notes, and snippets.

View mks0ff's full-sized avatar

Sofiane Laouini mks0ff

  • Monoidal Software
  • Paris
  • X @mks0ff
View GitHub Profile
@mks0ff
mks0ff / java-async-profiler.txt
Created June 8, 2018 11:01 — forked from prasanthj/java-async-profiler.txt
Java Async Profiler Usage
# Pre-req: gcc, gcc-c++, git (to clone), openjdk with debug symbols (centos: java-1.8.0-openjdk-debug.x86_64, ubuntu: openjdk-8-dbg)
# Git clone async-profiler https://github.com/jvm-profiling-tools/async-profiler
# Make sure JAVA_HOME is set and you are logged as same user running the java process
cd async-profiler
make all
# Also git clone FlameGraph in the same directory as you clone async-profiler
# sysctl changes
echo 1 > /proc/sys/kernel/perf_event_paranoid
echo 0 > /proc/sys/kernel/kptr_restrict
@mks0ff
mks0ff / DockerCleanupScripts.md
Created October 7, 2018 06:21 — forked from johnpapa/DockerCleanupScripts.md
Docker Cleanup Scripts

Docker - How to cleanup (unused) resources

Cleanup resources (containers, volumes, images, networks) ...

delete volumes

// see: https://github.com/chadoe/docker-cleanup-volumes

$ docker volume rm $(docker volume ls -qf dangling=true)

$ docker volume ls -qf dangling=true | xargs -r docker volume rm

@mks0ff
mks0ff / YOKOZUNA.md
Created July 12, 2019 21:01 — forked from drewkerrigan/YOKOZUNA.md
Yokozuna Setup

Create a schema based on the default one

https://github.com/basho/yokozuna/blob/develop/priv/default_schema.xml

Upload your schema

curl -XPUT -H 'Content-Type: application/xml'  http://localhost:8098/search/schema/drew_schema --data-binary @"my_schema.xml"

I've been working with Kafka for over 7 years. I inevitably find myself doing the same set of activities while I'm developing or working with someone else's system. Here's a set of Kafka productivity hacks for doing a few things way faster than you're probably doing them now. 🔥

Get the tools

@mks0ff
mks0ff / iterm2-solarized.md
Created October 10, 2022 10:13 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + Oh My Zsh + Solarized color scheme + Source Code Pro Powerline + Font Awesome + [Powerlevel10k] - (macOS)

Default

Default

Powerlevel10k

Powerlevel10k

BigQuery tricks

Data

Click to see script
with
dta as (
select '+++bHyZZlp6KRHJBj5Cw8wd48QA=' Id, timestamp('2019-11-07 06:53:39.632 UTC') Ts union all
@mks0ff
mks0ff / bq_storage_across_org.sql
Created May 11, 2023 12:23 — forked from sayle-doit/bq_storage_across_org.sql
Determine BigQuery Storage Costs Across an Organization for Both Compressed (Physical) and Uncompressed (Logical) Storage
/*
* This query will run across an entire organization looking at tables across every project
* and shows how they will compare on compressed and uncompressed storage.
*
* Region Notes:
* This query will only read from a single region or multi-region at a time. It's
* currently not possible to read this data from across all
*
* By default this reads from the US multi-region, so this might need to be changed if
* your data lives elsewhere.