Skip to content

Instantly share code, notes, and snippets.

View rasjani's full-sized avatar
🎧

Jani Mikkonen rasjani

🎧
View GitHub Profile
import re
from PIL import Image
from natsort import natsorted
from pathlib import Path
import subprocess
# convert 1-2.png -crop 2x1@ out-%d.png
# convert etukansi.png -background white -page a5 etu.pdf
function(get_version JSONFILE OUTVAR)
file(READ ${JSONFILE} _data)
string(REGEX MATCH "\"version\": \"(.*)\"," _version ${_data})
string(REPLACE "\"" ";" _data ${CMAKE_MATCH_1})
list(GET _data 0 _version)
set(${OUTVAR} "${_version}" PARENT_SCOPE)
endfunction()
@rasjani
rasjani / dummy2.robot
Created June 28, 2019 11:07
same example but with "data driver approach"
*** Settings ***
Library String
Test Template Do Something With The Test Data
*** Test Cases *** MYSTR
Test Case With Star Trek as Input String Star Trek
Test Case With Star Wars as Input String Star Wars
Test Case With PErry Rhodan as Input String Perry Rhodan
*** Keywords ***
@rasjani
rasjani / dummy.robot
Created June 28, 2019 10:50
for loop example
@{ITEMS} Create List Star Trek Star Wars Perry Rhodan
FOR ${ELEMENT} IN @{ITEMS}
${ELEMENT} Replace String ${ELEMENT} ${SPACE} ${EMPTY}
Log ${ELEMENT}
END
@rasjani
rasjani / pathext_handler.sh
Created February 16, 2017 15:43
use $PATHEXT variable in cygwin to find file extensions when executing commands ..
# place this into /etc/profile.d/pathext_handler.sh
command_not_found_handle() {
res=127
cmd=$1
if [ ! -z "${PATHEXT-x}" ]; then
cmd=$1
shift
OIFS=$IFS
IFS=';'
for ext in ${PATHEXT}; do

Keybase proof

I hereby claim:

  • I am rasjani on github.
  • I am rasjani (https://keybase.io/rasjani) on keybase.
  • I have a public key whose fingerprint is A742 6AA2 6A34 1F2B D5A3 73D2 412E B561 EAE2 70F5

To claim this, I am signing this object:

@rasjani
rasjani / Instructions
Last active August 29, 2015 14:19
Webpack with canjs
Grunt-webpack to load these:
./config/grunt/webpack.js
./config/webpack.conf.js
Currently using canjs from grunt build:
clone canjs repo
build it:
* npm install