Skip to content

Instantly share code, notes, and snippets.

View bookmarklet-tuwel-matrfilter.min.js
javascript:(function(){var notEls=[];function _handleInput(complement){var input=window.prompt('Insert matriculation numbers','');var numbers=input.split(/[^0-9]+/);numbers=numbers.map(function(n){if(n.length==7){return'0'+n}else{return n}});var els=document.querySelectorAll('td.idnumber');els=Array.prototype.filter.call(els,function(el){var idx=numbers.indexOf(el.innerHTML.trim());if(idx>=0){numbers.splice(idx,1)}if(complement&&idx<0||!complement&&idx>=0){return true}return false}).map(function(el){return el.parentElement});return[els,numbers]}function doAsk(){dont();var x=_handleInput(true);notEls=x[0];if(x[1].length){alert('The following matriculation numbers are not int this list: '+x[1])}_do()}function download(){var x=_handleInput(false);var els=x[0];if(x[1].length){alert('The following matriculation numbers are not int this list: '+x[1])}var files=els.map(function(el){return el.querySelector('a[href*=submission_file]').href});for(var i=0;i<files.length;i++){if(!window.open(files[i],'_blank')){alert('Po
@dlaxar
dlaxar / a. Add the epel repo to yum
Created Jun 26, 2012
Installing Redmine AND GitLab on CentOS 6.2 (part 1)
View a. Add the epel repo to yum
rpm -Uvh http://fedora.aau.at/epel/6/i386/epel-release-6-7.noarch.rpm
@dlaxar
dlaxar / README.md
Created Apr 15, 2020
Mail Merge to Individual files PDF Macro Word/Office 365
View README.md
  1. Open file and save as .doc
  2. Do your Mail Merge stuff
  3. Create a new Macro (Tools > Macro > Macro) with name 'toindivid'
  4. Paste the contents of the file macro.vba
  5. Change where needed