Skip to content

Instantly share code, notes, and snippets.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get install --reinstall git dkms build-essential linux-headers-$(uname -r)
git clone https://github.com/tomaspinho/rtl8821ce
cd rtl8821ce
chmod +x dkms-install.sh
chmod +x dkms-remove.sh
sudo ./dkms-install.sh
{
"nodes": [{
"id": "10",
"name": "0611 205 70 10"
},{
"id": "11",
"name": "0611 205 70 11"
},{
"id": "12",
"name": "0611 205 70 12"
#!/usr/bin/ruby
integer_attributes = ["order", "progress"]
require "nokogiri"
x = Nokogiri::XML File.read "swift3_db.xml"
referencing = x.xpath("//mxCell").find_all{|e| e["source"]}.collect{|e| e["source"]}
p referencing.sort
result = {}
x.xpath("//mxCell").find_all{|e| e["parent"] == "1" && !e["target"]}.each do |model|
#HALLO
#!/bin/bash
colleagues="accounting roy
accounting rainer
sales volker
sales vera
personell paula
personell peter
director gertrud
workscouncil gertrud
#!/bin/bash
host="root@example"
date="$(date +%Y-%m-%d_%H-%M)"
for d in $(zfs list -o mountpoint); do
if [ $d = "MOUNTPOINT" ]; then continue; fi # skip table head
from="$from $d"
done
TYPE=hourly
if [[ "$TYPE" != "" ]]; then
for i in $(zfs list -t snapshot | grep @zfs-auto-snap_$TYPE | cut -f1 -d" "); do
echo "delete $(zfs list -t snapshot | grep @zfs-auto-snap_$TYPE | wc -l) snapshots?"; read
echo $i; zfs destroy $i
done
fi
@CroneKorkN
CroneKorkN / gist:b0d67026383ea1a972a74cbaac4f38ce
Last active May 17, 2017 06:37
bettertochtool cpu usage
return do shell script "echo cpu $(ps axo %cpu | awk '{s+=$1}END{print s}' | cut -f 1 -d '.')%"
return do shell script "echo cpu $(ps axo %cpu | awk '{s+=$1}END{print s}' | cut -f 1 -d '.')%"
@CroneKorkN
CroneKorkN / gist:476778bb669dcb7610ba7f8ac5a930bb
Last active February 24, 2024 13:31
zfs arc hit ratio monitor
#!/bin/bash
# author: louwrentius
# source: http://louwrentius.com/zfs-on-linux-monitor-cache-hit-ratio.html
INTERVAL="$1"
if [ -z $INTERVAL ]
then
INTERVAL=5