Skip to content

Instantly share code, notes, and snippets.

Avatar

Sling00 sling00

  • USA
View GitHub Profile
@sling00
sling00 / dfree-bsd
Last active Aug 29, 2015
dfree-bsd
View dfree-bsd
#!/bin/bash
#Originally by stanislavs from post
#http://stanislavs.org/reporting-correct-space-usage-for-samba-shared-zfs-volumes/#comment-2443
#Used some updated code from github user umito / Peter on that site to clean up the non zfs code.
MYDIR=`readlink -f $PWD`
MYDIR2=`df -h $MYDIR | tail -1 | awk '{print $6}'`
if [[ `mount -p | grep $MYDIR2 | grep -c zfs` > 0 ]]
then
#echo "DEBUG: this is zfs"
USED=$((`zfs get -o value -Hp used $PWD` / 1024)) > /dev/null
View pkgbuilder
#!/bin/bash
if [ "$1" = "extractall" ]; then
for f in `ls *.deb`; do
FOLDER=$(echo "$f" | sed 's/.deb//g' )
echo $FOLDER
mkdir -p $FOLDER/DEBIAN
dpkg -x $f $FOLDER
dpkg -e $f $FOLDER/DEBIAN
done
elif [ "$1" = "extract" ]; then
View ccminer-makefile.patch
diff --git a/Makefile.am b/Makefile.am
index ddfbec6..f8b2d69 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -116,11 +116,12 @@ endif
ccminer_LDADD += -lcuda
nvcc_ARCH :=
-#nvcc_ARCH += -gencode=arch=compute_61,code=\"sm_61,compute_61\"
+nvcc_ARCH += -gencode=arch=compute_70,code=\"sm_70,compute_70\"
@sling00
sling00 / dfree
Last active Apr 11, 2022
disk free for samba that can determine fs type and calculate accordingly.
View dfree
#!/bin/bash
#Originally by stanislavs from post http://stanislavs.org/reporting-correct-space-usage-for-samba-shared-zfs-volumes/#comment-2443
#Used some updated code from github user umito / Peter on that site to clean up the non zfs code.
if [[ `findmnt -n -o FSTYPE -T "$PWD" | grep -c zfs` > 0 ]]
then
# echo "DEBUG: this is zfs"
USED=$((`zfs get -o value -Hp used $PWD` / 1024)) > /dev/null
AVAIL=$((`zfs get -o value -Hp available $PWD` / 1024)) > /dev/null
TOTAL=$(($USED+$AVAIL)) > /dev/null
@sling00
sling00 / ixgbe_debian.md
Last active Apr 11, 2022 — forked from kslimani/ixgbe_debian.md
Debian ixgbe module compilation
View ixgbe_debian.md