Skip to content

Instantly share code, notes, and snippets.

View alenkovich's full-sized avatar

Alen Vodopijevec alenkovich

  • Rudjer Boskovic Institute
  • Zagreb
View GitHub Profile
# Update sustem
sudo apt update
sudo apt -y upgrade
# Install R
sudo apt -y install r-base
# Install R-Studio
### $ sudo apt-get install cryptsetup
### $ cryptsetup --verbose --verify-passphrase luksFormat /dev/sdb1
### $ cryptsetup luksDump /dev/sdb1
$ cryptsetup luksOpen /dev/sdb1 sdb1
### $ mkfs.ext3 /dev/mapper/sdb1
Place this in the "Question validation equation" field:
this <= date('Y')
And, something like this in the "Question validation tip" field:
{if(this <= date('Y'), 'Okay', 'Try again!')}
@alenkovich
alenkovich / replace_php_short_tags.sh
Created March 16, 2017 12:34 — forked from ma2thieu/replace_php_short_tags.sh
replace php short tags (<?) with long one (<?php)
#!/bin/bash
# first short tags with something that is not a letter after
find . -iname "*.php" -print0 | xargs -0 -I{} sed -i -r 's/(<\?)([^a-zA-Z])/\1php\2/g' '{}'
# then short tags at end of line
find . -iname "*.php" -print0 | xargs -0 -I{} sed -i -r 's/<\?$/<\?php/g' '{}'
in cfg.d create file z_FILE_NAME.pl
in that file is definition of an eprint automatic field that is stored with eprint if creators have an ID
that way we can use only those authors/creators that have matching ID
next we have to update database
/usr/share/eprints3/bin/epadmin update ARHCIVE
afther that we have to recommit all eprints so autocomplete field can create those values for stored eprints
/usr/share/eprints3/bin/epadmin recommit ARCHIVE eprint
Make audio louder
---
ffmpeg -i lecture3_2013.16.09.ogv -vn audio.ogg
ffmpeg -i audio.ogg -vol 2048 audio-loud.ogg
ffmpeg -i lecture3_2013.16.09.ogv -vcodec copy -an lecture3_2013.16.09-nosound.ogv
ffmpeg -i lecture3_2013.16.09-nosound.ogv -i audio-loud.ogg -vcodec copy lecture3_2013.16.09-loud.ogv
# iptables -t nat -A PREROUTING -p tcp -i br0 --dport 80 -j DNAT --to-destination 192.168.122.53:80
# iptables -A FORWARD -p tcp -d 192.168.122.53 --dport 80 -m state --state NEW,ESTABLISHED,RELATED -j ACCEPT
// https://www.limesurvey.org/en/forum/can-i-do-this-with-limesurvey/91501-answer-options-based-on-previous-question?q=/en/forum/can-i-do-this-with-limesurvey/91501-answer-options-based-on-previous-question?q=/en/forum/can-i-do-this-with-limesurvey/91501-answer-options-based-on-previous-question
<script type="text/javascript" charset="utf-8">
$(document).ready(function(){
// The Q2 options relevant to the Q1 options
teacherLists = {
C1 : 'T1,T3,T5',
C2 : 'T1,T2,T3,T4',
C3 : 'T2,T3,T4,T5',
C4 : 'T1,T4,T6',
# touch bla.txt
# git init
# git add -A
# git commit -a -m 'initial commit'
# git remote add laravel git://github.com/laravel/laravel.git
# git fetch laravel
# git checkout -b framework laravel/master