Skip to content

Instantly share code, notes, and snippets.

@forkrul
forkrul / GORILLA.BAS
Created November 10, 2020 10:16 — forked from caffo/GORILLA.BAS
QBasic Gorillas
' Q B a s i c G o r i l l a s
'
' Copyright (C) IBM Corporation 1991
'
' Your mission is to hit your opponent with the exploding banana
# strip orientation
exiftool -all= *.jpg # also strips orientation
# fix portraits in gwenview.
# convert sony camera items from raw to jpg
ufraw-batch *.ARW --out-type=jpeg --compression=99
# landscape portrait separation
mkdir portrait
@forkrul
forkrul / todo.el
Last active June 3, 2018 12:15 — forked from prathik/todo.el
Manage daily todo files on Emacs
(defun todo-create-directory (directory)
"Creates the todo directory."
(if (file-exists-p directory) (message "Directory exists")
(make-directory directory)
(message "Directory created")
))
(defun create-todo-file (directory filename)
"Checks if the todo file exists if not creates it."
(create-directory directory)
#!/bin/sh
# https://rawsontetley.org/ref_steamlinkwine.html
env
cd ~
PATH=$HOME/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games
unset LD_PRELOAD
unset LD_LIBRARY_PATH
unset SYSTEM_PATH
/usr/bin/playonlinux --run "Steam"
#!/bin/bash
set -e
# Usage:
# rsync_parallel.sh [--parallel=N] [rsync args...]
#
# Options:
# --parallel=N Use N parallel processes for transfer. Defaults to 10.
#
# Notes:
@forkrul
forkrul / gist:9942575
Created April 2, 2014 20:34
rename recursively with testing
# requires bash > 4
shopt -s globstar
rename -n 's/special/regular/' ** #remove n when testing is done
ffmpeg -i hlah_3.flac -strict experimental -acodec vorbis -aq 100 hlah.ogg
#! /usr/bin/env ruby
# encoding: UTF-8
require 'date'
since = ARGV.shift || Date.today
logs = `git log --since="#{since}" --pretty=format:"%H,%ae,%ai"`
all_commits = logs.split("\n").map{|i| i.split(",") }
@forkrul
forkrul / Unix tips
Last active December 14, 2015 16:28
Unix tricks
# http://mmb.pcb.ub.es/~carlesfe/unix/tricks.txt
I have marked with a * those which I think are absolutely essential
Items for each section are sorted by oldest to newest. Come back soon for more!
BASH
* In bash, 'ctrl-r' searches your command history as you type
- Add "set -o vi" in your ~/.bashrc to make use the vi keybindings instead
of the Emacs ones. Takes some time to get used to, but it's fantastic!
- Input from the commandline as if it were a file by replacing
'command < file.in' with 'command <<< "some input text"'