Skip to content

Instantly share code, notes, and snippets.

@Frogli
Frogli / mov2gif.sh
Last active February 28, 2020 08:53
Utility script to convert mov files to gif
#!/usr/local/bin/bash
usage="Converts a .mov file to a gif with.
Command: mov2gif.sh [file.mov] [nnnnxnnnn]
[file.mov] Input file
[nnnnxnnnn] Optioneel. Output resolution"
case $1 in
-h)
echo $usage ;;
@Frogli
Frogli / mysqldump_trigger.sh
Created September 27, 2018 08:52
Dump all triggers of a MySQL database, each in a seperate file
#!/usr/local/bin/bash
#
# Description: Dump all triggers of a database, each in a seperate file. See below which parameters to use. At execution it will ask for the MySQL password
#
#
usageMessage=$(cat << EOF
usage: mysqldump_trigger.sh [-h hostname] [-p port] [-u user] [-d database] [-o outfolder] [\?]
Dump all triggers of MySQL database schema to files. Each trigger will be put in a seperate file. At execution there will be asked for the password of the SQL user.
@Frogli
Frogli / bintobase64Example
Created July 3, 2018 11:37
An example how to use the bintobase64 function
Calculate charValue as 'Hello World'
Do chartoutf8(charValue) Returns binValue
Do bintobase64(binValue) Returns base64Bin
Do utf8tochar(base64Bin) Returns base64value
@Frogli
Frogli / SaveLoadVariablesFromFile.sh
Last active November 10, 2017 11:32
Bash: Saving and loading variables from File
#!/bin/bash
#
# source: https://www.linuxquestions.org/questions/programming-9/bash-script-%96-reading-and-writing-variables-to-a-separate-file-365158/#post1861674
#
PREFIX=playback
saveVariables()
{
set | grep ^$PREFIX
}
@Frogli
Frogli / Solarized Dark.json
Last active August 23, 2017 08:39
Solarized Dark theme for Omnis Studio 8.x
{
"bracketbackcolor": 0,
"bracketcolor": 195582,
"clientexeccolor": 112899,
"color3ddkshadow": 9868418,
"color3dface": 5655610,
"color3dhighlight": 8818972,
"color3dhilight": 8818972,
"color3dlight": 9868418,
"color3dshadow": 9868418,
@Frogli
Frogli / dosbatch.sublime-build
Created July 10, 2017 09:46 — forked from andresgutgon/dosbatch.sublime-build
Batch File Running for Sublime Text 2
{
"cmd": ["$file"],
"working_dir": "$file_path",
"selector": "source.dosbatch"
}
@Frogli
Frogli / intelliJ.json
Last active October 20, 2017 09:46
Omnis Studio theme based on the IntelliJ Code syntax highlighting theme
{
"bracketbackcolor": 0,
"bracketcolor": 195582,
"clientexeccolor": 112899,
"color3ddkshadow": 12303291,
"color3dface": 5526612,
"color3dhighlight": 7829367,
"color3dhilight": 7829367,
"color3dlight": 2763306,
"color3dshadow": 7829367,
@Frogli
Frogli / JavaRegularExpression.omh
Last active October 18, 2017 21:02
Omnis Studio Regular Expression search using java.util.regex.Pattern
; Omnis Studio regex search using Java libary java.util.regex.Pattern. For more information about this libary see
; http://docs.oracle.com/javase/6/docs/api/java/util/regex/Pattern.html
; Do a match on a string. The string has to match the regex completely
; Lines 2-4 can either be done be define the variables in variable pane of the class editor or with notation.
; see http://www.omnis.net/documentation/extendingomnis/index.jsp?detail=03javaobjs.html#defining-java-objects
Variable: RegexString Object JavaObjs Librar.JavaObjs\System\java\lang\String
Variable: TargetString Object JavaObjs Librar.JavaObjs\System\java\lang\String
Variable: Pattern.JavaObjs Library.JavaObjs\System\java\util\regex\Pattern