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/zsh | |
fgrep 'public' $1 | egrep 'set|get' | sed 's/public/+/g' | sed -e 's/=.*//g' | tr -d '{;' | sed -e 's/^[ \t]*//' | |
echo | |
fgrep 'public' $1 | egrep -v 'class|set|get' | sed 's/public/+/g' | sed -e 's/=.*//g' | tr -d '{;' | sed -e 's/^[ \t]*//' | |
echo | |
fgrep 'private' $1 | egrep -v 'class|set|get' | sed 's/private/-/g' | sed -e 's/=.*//g' | tr -d '{;' | sed -e 's/^[ \t]*//' |
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
#define MOTOR1_CW 3 | |
#define MOTOR1_CCW 5 | |
#define MOTOR2_CW 6 | |
#define MOTOR2_CCW 9 | |
#define STATE_MOTOR 0 | |
#define STATE_DIRECTION 1 | |
#define STATE_SPEED 2 | |
#define BUFFER_SIZE 10 |
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 | |
FILE=$1 | |
#public members | |
printf "\nPUBLIC MEMBERS\n" | |
fgrep 'public' $FILE | fgrep -v '(' | fgrep -v 'class' | awk '{print $3}' | |
#private members | |
printf "\nPRIVATE MEMBERS\n" | |
fgrep 'private' $FILE | fgrep -v '(' | awk '{print $3}' | |
printf "\nPUBLIC FUNCTIONS\n" | |
fgrep 'public' $FILE | egrep -v 'class|get|set|abstract' | awk '{$1=""; print}' | tr -d '{' | sed -e 's/^[ \t]*//' |
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 [ $# -eq 0 ]; then | |
echo "Need directory argument" | |
exit | |
fi | |
if [ ! -d $1 ]; then | |
echo "Given path is not a directory" | |
exit |
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 [[ $# -ne 1 ]]; then | |
echo "No file specified" | |
exit | |
fi | |
FILE=$1 | |
#public properties |
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
/* | |
* Load raw binary data from a mmap(2)'ed file | |
* Mind your endianness and alignment. | |
* | |
* Sun, 12 Jan 2020 12:00:00 +0000 | |
* By Gydo194 | |
* | |
* This code is in the public domain, you may use and redistribute this | |
* file as you wish, however I shall not be responsible for any damage caused | |
* by you doing so. |
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 | |
DELAY=10 | |
function update() | |
{ | |
DATE=`date "+%H:%M"` | |
BAT=`acpi -b | awk '{print $4}'` | |
VOL=`pactl list sinks | fgrep 'Base Volume:' | awk '{print $5}'` |
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 | |
# Map button 1 to Ctrl-Z, button 2 to Shift-Ctrl-Z and map the tablet area to the "eDP1" monitor | |
xsetwacom set "Wacom Intuos S Pad pad" Button 1 "key +ctrl z -ctrl" | |
xsetwacom set "Wacom Intuos S Pad pad" Button 2 "key +ctrl +shift z -ctrl -shift" | |
xsetwacom set "Wacom Intuos S Pen stylus" MapToOutput eDP1 | |
xsetwacom set "Wacom Intuos S Pen cursor" MapToOutput eDP1 | |
xsetwacom set "Wacom Intuos S Pen eraser" MapToOutput eDP1 |
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
; print all command line arguments (5 characters) and exit | |
; for 64-bit systems, Linux syscalls | |
; for simplicity, this program does not calculate the length of the strings. | |
; assemble with: nasm -f elf64 -o args args.asm | |
; link with: ld -o args args.o | |
sys_write equ 1 ; the linux WRITE syscall | |
sys_exit equ 60 ; the linux EXIT syscall | |
sys_stdout equ 1 ; the file descriptor for standard output (to print/write to) |
NewerOlder