Skip to content

Instantly share code, notes, and snippets.

View ljantzen's full-sized avatar

Leif Jantzen ljantzen

View GitHub Profile
@ljantzen
ljantzen / diskuse.sh
Created January 5, 2024 10:59
Shell script calculating how big percentage a directory takes of total disk space
#!/bin/bash
# Function to calculate the percentage
calculate_percentage() {
total_space=$(df -k --output=size "$1" | sed -n '2p' | tr -d '[:space:]')
used_space=$(du -sk "$1" | cut -f1 | tr -d '[:space:]')
percentage=$(echo "scale=2; ($used_space / $total_space) * 100" | bc)
echo "$percentage $1"

Keybase proof

I hereby claim:

  • I am ljantzen on github.
  • I am ljantzen (https://keybase.io/ljantzen) on keybase.
  • I have a public key whose fingerprint is F15F 775D 71CC 728B 7304 F5DA 0DE0 92E7 F23A 346C

To claim this, I am signing this object:

C:\dev\ruby>gli init todo add list delete status done
Creating dir ./todo/lib...
Creating dir ./todo/bin...
Creating dir ./todo/test...
Created ./todo/bin/todo
Created ./todo/README.rdoc
Created ./todo/todo.rdoc
Created ./todo/todo.gemspec
Created ./todo/test/default_test.rb
Created ./todo/test/test_helper.rb
@ljantzen
ljantzen / m2.sh
Created October 11, 2010 07:22
m2 repo switcher
<mirror>
<id>nexus</id>
<mirrorOf>*</mirrorOf>
<url>http://nexus:8100/nexus/content/groups/public</url>
</mirror>
</mirrors>