Skip to content

Instantly share code, notes, and snippets.

Daniel Laxar dlaxar

  • Vienna
View GitHub Profile
@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
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
View bookmarklet-tuwel-matrfilter.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;
@dlaxar
dlaxar / .gitignore
Created Oct 13, 2013 — forked from redoPop/.gitignore
.gitignore for Wordpress
View .gitignore
# This is a template .gitignore file for git-managed WordPress projects.
#
# Fact: you don't want WordPress core files, or your server-specific
# configuration files etc., in your project's repository. You just don't.
#
# Solution: stick this file up your repository root (which it assumes is
# also the WordPress root directory) and add exceptions for any plugins,
# themes, and other directories that should be under version control.
#
# See the comments below for more info on how to add exceptions for your
@dlaxar
dlaxar / 1.js
Last active Dec 11, 2015
MPCA #5
View 1.js
var str = "Wir berechnen einen ASCII Wert";
var max = 0, temp;
for(var i = 0; i < str.length; i++) {
temp = str.charCodeAt(i);
if(temp > max) {
max = temp
}
}
View CipherManager.java
package u2;
import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
public class CipherManager {
private byte[] bytes;
View l4.js
var count = {};
var array = ["str1", "str2", "string 3", "string 4", "s5", "string 4", "s5", "str2", "string 3", "string 4", "s5", "string 4", "str1"];
for(var i = 0; i < array.length; i++) {
if(count[array[i]]) {
count[array[i]]++;
}
else {
count[array[i]] = 1;
View test.php
<?php
echo 'test';
?>
You can’t perform that action at this time.