Skip to content

Instantly share code, notes, and snippets.

View munhitsu's full-sized avatar

Mateusz Łapsa-Malawski munhitsu

  • cr3.io
  • London, UK
View GitHub Profile
# downlaod from https://apps.apple.com/us/app/macos-ventura/id1638787999?mt=12
sudo /Applications/Install\ macOS\ Ventura.app/Contents/Resources/createinstallmedia --volume /Volumes/USB

Keybase proof

I hereby claim:

  • I am munhitsu on github.
  • I am munhitsu (https://keybase.io/munhitsu) on keybase.
  • I have a public key whose fingerprint is A1FD 1761 CF00 5402 C93C 5C1F 91FF 6CF6 C537 D591

To claim this, I am signing this object:

@munhitsu
munhitsu / tickets.py
Created January 24, 2018 12:15
Zendesk tickets.xml to csv (opinionated)
import csv
import xml.etree.ElementTree as ET
# was: for $x in ./tickets/ticket return string-join((data($x/created-at), data($x/current-tags), data($x/subject), data($x/description), data($x/status-id)),", ")
SERVICE_ID = '31281329'
tree = ET.parse('tickets.xml')
root = tree.getroot()
xqilla -i users.xml <(echo 'for $x in ./users/user return string-join((data($x/email), data($x/roles), data($x/last-login)),", ")') > users.csv
@munhitsu
munhitsu / gist:0d4b3d0dc6177620b8be
Last active March 8, 2016 16:04
docker commands
#nice docker stats
docker stats $(docker ps --format '{{.Names}}')
#old way
docker stats $(docker ps | awk '{if(NR>1) print $NF}')
@munhitsu
munhitsu / gist:c0d0bff53ad5219818cd
Created March 4, 2016 17:55
wait for postgresql (i.e. within docker container)
until nc -z ${POSTGRES_PORT_5432_TCP_ADDR} ${POSTGRES_PORT_5432_TCP_PORT}; do
echo "$(date) - waiting for postgres..."
sleep 1
done
brew install swig
env LDFLAGS="-L$(brew --prefix openssl)/lib" \
CFLAGS="-I$(brew --prefix openssl)/include" \
SWIG_FEATURES="-cpperraswarn -includeall -I$(brew --prefix openssl)/include" \
pip install m2crypto
@munhitsu
munhitsu / gist:a5fb0fa2b49897884987
Last active January 22, 2016 15:48
where to go in Poland
Kraków - university city - ex-capital - where I lived for 13 years
a trip to Auschwitz - difficult but worth
a trip to Wieliczka - picturesque salt mine with loads of salt sculptures, and underground salt church
restaurant - Jarema - for properly made traditional food
Wrocław - smaller, just charming - plenty of German architecture influences
beautiful walks over riverbanks
Gdańsk - the oldest, and the most important port city - go to the old town - german/danish, influence
#check logs
curl http://localhost:9200/_cluster/health?pretty
curl http://localhost:9200/_cat/indices?v
curl http://localhost:9200/_cat/nodes?v
curl http://localhost:9200/_cat/shards?v
curl localhost:9200/_nodes/process?pretty
@munhitsu
munhitsu / gist:c74b3f627066392a1fb4
Last active October 29, 2015 12:32
NTP debugging/config aws context
# recommended ntp pool (/etc/ntp.conf)
server 0.amazon.pool.ntp.org iburst
server 1.amazon.pool.ntp.org iburst
server 2.amazon.pool.ntp.org iburst
server 3.amazon.pool.ntp.org iburst
ntpq
> peers
check for connection prefixed with *
> as