This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ; Ender 3 Custom Start G-code | |
| M117 Getting the bed up to temp! | |
| M140 S{material_bed_temperature_layer_0} ; Set Heat Bed temperature | |
| M190 S{material_bed_temperature_layer_0} ; Wait for Heat Bed temperature | |
| M117 Pre-heating the extruder! | |
| M104 S160; start warming extruder to 160 | |
| G28 ; Home all axes | |
| M117 Auto bed-level GO! | |
| G29 ; Auto bed-level (BL-Touch) | |
| G92 E0 ; Reset Extruder |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ## CONFIGURATION | |
| export NAME=$(basename "$0" .sh) | |
| export LOCKFILE_DIR="Lockfile" | |
| export PENDING_DIR="Inbound" | |
| export FAILED_DIR="Failed" | |
| export PROCESSED_DIR="Processed" | |
| export LOG_FILE="$NAME.log" | |
| export NOTIFY_ON_FAIL=true | |
| export NOTIFY_EMAIL="mail@karlbaillie.com" | |
| export DEBUG=true |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # | |
| # A script to generate any number of files with random names and contents | |
| # | |
| # Usage: generate-test-files.sh (No. of Files) (Size in MB) (Path To Destination) | |
| # Example: ./generate-test-files.sh 50 25 ./Folder | |
| # | |
| # (c) 2017, Karl Baillie <mail@karlbaillie.com> | |
| # |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # find out how much space is available on the partition /var/log/app resides upon | |
| SPACE_USED=$(df -P /var/log/app | awk '{ if(NR>1)print }' | awk '{ print $5 }' | tr -d '%') | |
| # set the threshold to clear at once breached (percentage) | |
| SPACE_USED_MAX=80 | |
| # get the date in a format we can use | |
| DATE=$(date '+%Y%m%d') | |
| # if we're getting low on space where /var/log/app resides |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/bin/perl | |
| use File::KeePass; | |
| use Term::ReadKey; | |
| use Data::Dumper qw(Dumper); | |
| use Getopt::Long qw(GetOptions); | |
| use Digest::MD5 qw(md5_hex); | |
| use MIME::Base64; | |
| use File::Slurp; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var casper = require('casper').create({ | |
| verbose: true, | |
| logLevel: 'info', | |
| pageSettings: { javascriptEnabled: true }, | |
| viewportSize: { width: 1600, height: 900 } | |
| }); | |
| var url = 'http://www.kjbweb.net/', | |
| xp = require('casper').selectXPath; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| HISTFILE=~/.histfile | |
| HISTSIZE=100000 | |
| SAVEHIST=1000 | |
| bindkey -e | |
| zstyle :compinstall filename '/home/karl/.zshrc' | |
| autoload -Uz compinit | |
| compinit |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| if [ "$1" = "" ] | |
| then | |
| echo "No owner specified." | |
| echo "Usage: $0 owner" | |
| exit | |
| fi | |
| owner="$1" | |
| grep ": $owner\$" /etc/userdomains || { | |
| echo "$owner doesn't exist on this server." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
| { | |
| // Define theme and color scheme | |
| "color_scheme": "Packages/Theme - Dark Material/schemes/Dark-Material.tmTheme", | |
| "theme": "Dark-Material.sublime-theme", | |
| // Keeping those lines smooth | |
| // "font_face": "Monaco", | |
| "font_size": 10, | |
| "line_padding_bottom": 3, | |
| "line_padding_top": 3, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| FILES=./*.tar.gz | |
| for f in $FILES | |
| do | |
| echo "Extracting $f..." | |
| tar -xzf $f | |
| n=$(basename $f .tar.gz) | |
| echo "Unpacking $n/homedir.tar to ./$n/..." | |
| tar -xf $n/homedir.tar -C ./$n/ | |
| echo "Done" |
NewerOlder