Skip to content

Instantly share code, notes, and snippets.

View isamert's full-sized avatar

İsa Mert Gürbüz isamert

View GitHub Profile
@isamert
isamert / ceng.sh
Last active March 31, 2018 16:26
ceng.sh
#!/bin/bash
base="http://ceng.anadolu.edu.tr/Ders.aspx?dersId="
courses=("120" "95" "105" "103" "24")
cache_folder="$HOME/.cache/ceng"
if [ ! -d "$cache_folder" ]
then
echo "First time usage."
echo "Downloading..."
@isamert
isamert / avrflash.fish
Last active December 22, 2017 22:21
A Fish function for compiling and flashing programs for ATMega32 via usbasp programmer
function avrflash
mkdir -p build
cd build
avr-gcc ../$argv -Os -Wall -mmcu=atmega32 -o main_bin
avr-objcopy -j .text -j .data -O ihex main_bin "main.hex"
avrdude -c usbasp -p m32 -U flash:w:"main.hex"
cd ..
end
#!/bin/bash
#
# Start VLC with TraktForVLC. It automatically quits TraktForVLC when VLC is closed.
#
python ~/.local/apps/TraktForVLC/TraktForVLC.py & export TRAKTPID=$!
/usr/bin/vlc --extraintf=rc --rc-host=localhost:4222 --started-from-file "$*"
kill $TRAKTPID
@isamert
isamert / CategoryTheoryForProgrammersExercises.kt
Last active August 21, 2017 20:09
Category Theory for Programmers (Exercise solutions)
//
// Category: The Essence of Composition
//
// id function
fun <T> id(a: T) = a
// compose function
fun <A, B, C> compose(a: (A) -> B, b: (B) -> C) = { x: A -> b(a(x)) }
@isamert
isamert / ConvertToUTF8.desktop
Created June 6, 2017 13:17
A dolphin service menu for converting files to UTF8 from different encodings
# Converts Turkish(Windows-1254) encoded subtitle files UTF8.
# You can change Windows-1254 to any encoding you want at line 24.
# Check this web page for your language:
# https://www.w3.org/International/O-charset-lang.html
# You can change/add MimeType to text/plain (or, again, anything you want)
# to be able to convert plain text files to UTF8 at line 17.
# Copy this file to this location: ~/.local/share/kservices5/ServiceMenus/
@isamert
isamert / ConvertFlacToMp3.sh
Last active June 6, 2017 13:21
Splitting *.flac files with *.cue and creating mp3/ogg files
#!/bin/bash
# This script takes all flac files in a folder, splits them according to cue file.
# Then converts all splitted flac files to mp3 (or ogg) files.
# Tags from the cue file kept in mp3 files.
# You need to install these packages in order to use this script:
# - cuetools
# - shntool
# - ffmpeg