Skip to content

Instantly share code, notes, and snippets.

@AkBKukU
AkBKukU / gethub.sh
Created July 17, 2018 19:15
Download github repos into sub directories based on the creator
#!/bin/bash
# Usage
#
# run `gethub githubuser/repo`
# example `gethub github/markup`
# checkDir
# Checks to see if a directory exists and creates it and any directories needed to get to it.
function checkDir ()
@AkBKukU
AkBKukU / spritstictch.sh
Created July 17, 2018 19:13
Stitch, trim, and make a grid of images to make a sprite sheet
#!/bin/bash
echo "Stitching Sprites"
function getImageFiles ()
{
# Get images name
dirname="$(pwd | tr '/' ' ' | awk '{print $(NF)}')"
filename="$dirname"
files=($(ls))
@AkBKukU
AkBKukU / battery.sh
Last active July 17, 2018 21:27
My MOTD and the needed battery and temp scripts. It needs lm-sensors at least.
#!/bin/bash
BATTERY=$(upower -e | grep battery )
BATSTAT="$(upower -i $BATTERY)"
TERMWIDTH=$(tput cols)
percent="$(echo "$BATSTAT" | grep percentage | awk '{print $2}')"
percent=${percent:0:$(expr ${#percent} - 1)}
if [ "t$1" != "t" ]
then
TERMWIDTH=$1
start
echo: External Reset
Marlin 1.1.7
echo: Last Updated: 2017-12-15 12:00 | Author: (Bob Kuhn, Anet config)
echo:Compiled: Dec 17 2017
echo: Free Memory: 12070 PlannerBufferBytes: 1232
echo:V47 stored settings retrieved (774 bytes; crc 54390)
echo: G21 ; Units in mm
echo: M149 C ; Units in Celsius
@AkBKukU
AkBKukU / bed-level.log
Last active December 17, 2017 22:48
log of repeated bed leveling
start
echo: External Reset
Marlin 1.1.7
echo: Last Updated: 2017-12-15 12:00 | Author: (Bob Kuhn, Anet config)
echo:Compiled: Dec 16 2017
echo: Free Memory: 11898 PlannerBufferBytes: 1232
echo:V47 stored settings retrieved (774 bytes; crc 54390)
echo: G21 ; Units in mm
echo: M149 C ; Units in Celsius
@AkBKukU
AkBKukU / herman_sim_60C.gcode
Last active December 17, 2017 17:04
GCODE file for Anet A8 for a SIM card adapter
; generated by Slic3r 1.3.0-dev on 2017-12-13 at 21:25:41
; external perimeters extrusion width = 0.40mm (0.29mm^3/s)
; perimeters extrusion width = 0.68mm (1.00mm^3/s)
; infill extrusion width = 1.20mm (4.76mm^3/s)
; solid infill extrusion width = 0.68mm (0.67mm^3/s)
; top infill extrusion width = 0.68mm (0.50mm^3/s)
; support material extrusion width = 0.40mm (1.17mm^3/s)
M107
@AkBKukU
AkBKukU / akbkuku.vim
Created November 15, 2017 03:18
My color theme for vim
set background=dark
if version > 580
hi clear
if exists("syntax_on")
syntax reset
endif
endif
set t_Co=256
let g:colors_name = "akbkuku"
@AkBKukU
AkBKukU / video-convert
Last active April 2, 2017 15:50
A basic script to batch convert a directory of videos
#!/bin/bash
# Get list of files from input directory
files=("$(ls input)")
# Output extension
outType=".mp4"
# Iterate over files
for file in $files
# CMake file for Vulkan Tutorial
# by Shelby Jueden (AkBKukU)
cmake_minimum_required(VERSION 3.1)
project(VKDemo)
# Set the name of the ouput binary
set(
BIN_NAME
/* -------------- MultiLEDPWM -------------- *\
| By: Shelby Jueden |
| Date: 2016-05-06 |
| |
| Description: This is a software PWM Library |
| that has 4 animations and a cycling mode. |
| It's designed to be used with a line of |
| LEDs. |
\*-------------------------------------------*/