Skip to content

Instantly share code, notes, and snippets.

View install.R
# install mrgsolve (or other libraries) if not installed
if(!require(mrgsolve)){
install.packages("mrgsolve")
library(mrgsolve, warn.conflicts = FALSE)
}
View gist:9786f8cdf0bcc49ae553a72841598243
concurrent = 1
check_interval = 0
[session_server]
session_timeout = 1800
[[runners]]
name = "LAPTOP1"
url = "https://gitlab.xxx"
token = "xxx"
@metelkin
metelkin / benchmark.R
Last active Jun 17, 2019
starting mrgsolve
View benchmark.R
f = function(){
mod %>%
mrgsim(delta=0.1, maxsteps=5e4, hmax=0.001, hmin=0) %>%
plot()
}
(f2 <- microbenchmark(f(), times = 5L))
@metelkin
metelkin / index.js
Created Sep 23, 2018
External parameters from webpack to code
View index.js
// __PROCESS__ is object from webpack, see "webpack.config.js"
const parameter = __PROCESS__.parameter;
...
@metelkin
metelkin / redirect.apache2.conf
Last active Sep 23, 2018
Examples of redirecting on apache server
View redirect.apache2.conf
### sudo a2ensite redirect.apache2.conf
### sudo service apache2 restart
### target may be http or https
### Permanent redirect user browser to http://target.example.com
<VirtualHost *:80>
ServerAdmin webmaster@localhost
ServerName source.example.com
ServerAlias source2.example.com
@metelkin
metelkin / config
Last active Oct 1, 2018
BAT file to switch file comparison adapted for git difftool
View config
...
; using windows tools to compare files
[diff]
tool=windiff
; set location of windiff.bat
[difftool "windiff"]
cmd = \"C:/windiff/windiff.bat\" \"$LOCAL\" \"$REMOTE\"
...
@metelkin
metelkin / config
Last active Dec 30, 2018
Example of .git/config file for working with qsp platforms: xlsx, word, xml, slv file comparison
View config
; using windows tools to compare files
[diff]
tool=windiff
; set location of windiff.bat
[difftool "windiff"]
cmd = \"Y:/testExel/windiff.bat\" \"$LOCAL\" \"$REMOTE\"
; Requires installation of node-textconv, see https://github.com/pismute/node-textconv
; The option is equivalent to: git config diff.xlsx.textconv "textconv --xlsx"
[diff "xlsx"]
textconv = textconv --xlsx
@metelkin
metelkin / .gitattributes
Last active Jun 11, 2018
Example of .gitattributes file for working with qsp platforms: xlsx, word, xml, slv file comparison
View .gitattributes
* text=auto
*.xls* diff=xlsx
*.doc* diff=word
*.xml diff=xml
*.slv diff=slv
You can’t perform that action at this time.