view · edit · sidebar · attach · print · history

<< 2018 | Home | 2016 >>

2017

15.12.2017

  • Tell Terminal not to wrap lines
 tput rmam
 grep -r pattern .

14.12.2017

  • Install high Sierra with Qemu on Gentoo.

22.11.2017

Generate AmiKo/CoMed Icons

 ./generator.sh DES_Icon-App_white.png "#FFFFFF" amiko_desitin
 ./generator.sh DES_Icon-App.jpg "#99AFD4" comed_desitin

using this Script. Attach:iOS-Icon_Launchimage_Generatorv1.2.txt
Image sizes are here

 https://stackoverflow.com/questions/39900225/ios-launch-image-for-all-devices-include-ipad-pro

21.11.2017

Sweet trick for webalizer not wanting to follow symlinks

Y=$(date +%Y)
m=$(date +%m)
d=$(date +%d)
/usr/local/bin/webalizer -c /etc/webalizer/oddb.org.conf /var/www/oddb.org/log/oddb/$Y/$m/$d/access_log

13.11.2017

  1. sudo su - postgres
  2. vacuumdb --analyze oddb.org.ruby193
  3. vacuumdb --full oddb.org.ruby193
  4. reindexdb -d oddb.org.ruby193
  5. https://wiki.postgresql.org/wiki/VACUUM_FULL

9.11.2017

  • checking free space on Linux
 ncdu
  • using rlcone
 rclone copy 2007.tar.bz2 OneDrive:thin/generika/
  • find the largest files
 du -a /var | sort -n -r | head -n 10

28.8.2017

  • Base64
 cat RZ_2017-09-22T211907.amk | base64 --decode
  • Letsencrypt
 ./certbot-auto certonly --standalone -w /var/www/oddb.org -d ch.oddb.org -d i.ch.oddb.org
 $ sudo certbot certonly --standalone -d example.com -d www.example.com from here

12.4.2017

  • Show duplicates
 Sort the file using :sort
 Execute command :g/^\(.*\)$\n\1$/p

28.3.2017

  • Upload file using slackcat
 slackcat -c rapflag -m sandoz.png

24.3.2017

  • Format ugly looking jason in vim
 :%!python -m json.tool
  • replace two or more whitespaces with comma
 :%s/\s\{2,}/,/gc

22.3.2017

  • Using gam
 gam print group-members group arzt1@oddb.org | grep user
 gam update group remove member user@domain.ch
 gam csv /tmp/regulatory_email_eu gam update group regulatory_eu@oddb.org add member ~Email user

17.3.2017

  • convert PDF to JPG
 pdfbox PDFSplit allegro_sports_short_de_2017.pdf
 convert -density 300 -trim allegro_sports_short_de_2017-6.pdf -quality 100 6.jpg

15.3.2017

  • What process runs on a specific port
 sudo netstat -nlp | grep :80
  • Pump Up Virtual Network Cards
 ifconfig eth0:45 62.12.131.45 netmask 255.255.255.240 up

12.3.2017

  • Show the python path
 python -c "import sys; print(':'.join(x for x in sys.path if x))"

10.3.2017

  • Unix Timestamp conversion:
 cat out | sed 's/^/echo "/; s/\([0-9]\{10\}\)/`date -d @\1`/; s/$/"/' | bash

2.3.2017

  • add leading zeros
 awk '{ printf("%03d\n", $1) }' 3.csv >> 3_final.csv 
 Attach:checkdigit.txt
 ./checkdigit < 6.csv > 7.csv

6.2.2017

  • Having password problems with Chrome? Try this:
 cd ~/.config/google-chrome-beta
 find . -type f -exec file {} + | grep -i SQLite | cut -d: -f1 | while read FILE; do     fuser -k -TERM "$FILE"; done

4.2.2017

  • Remove Docker images
 # docker images -q | xargs docker rmi
  • CNTK
 export PATH=/tmp/cntk/cntk/bin:$PATH
 export LD_LIBRARY_PATH=/tmp/cntk/cntk/lib:/tmp/cntk/cntk/dependencies/lib:$LD_LIBRARY_PATH

<< 2018 | Home | 2016 >>

view · edit · sidebar · attach · print · history
Page last modified on January 07, 2022, at 10:54 AM