Skip to content

Instantly share code, notes, and snippets.

Avatar

Leo Lindhorst DevWurm

View GitHub Profile
@DevWurm
DevWurm / rsa_database Hash Algorithms
Created May 11, 2015
This is the Hash Algorithm of the rsa_database project in a java implementation made by KKegel
View rsa_database Hash Algorithms
package main;
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
public class programm {
public static void main(String[] args) {
start(); //start prozedure
@DevWurm
DevWurm / parser.h
Created May 12, 2015
CSV parsing function
View parser.h
template<typename T>
void csv_parser<T>::set_line(string input) {
line.clear();
T buffer;
stringstream converter;
while (input.size() > 0) { //get field from input and delete this segment until
//input is empty
if (input.find_first_of(",") != -1) { //(not the last segment [one ',' left])
converter << input.substr(0, input.find_first_of(",")); //add segment to converter
View database.php
/*
* License
* Copyright 2015 DevWurm Enceladus-2, kkegel, mjoest, tarek96, Tolator and vgerber.
* This file is part of rsa_database.
* rsa_database is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@DevWurm
DevWurm / eclipse.desktop
Last active Aug 29, 2015
Eclipse .desktop File (assumes that the eclipse files are in /opt/eclipse/
View eclipse.desktop
[Desktop Entry]
Name=Eclipse
Comment=Java and C/C++ IDE.
GenericName=IDE
Exec=/opt/eclipse/eclipse
Icon=/opt/eclipse/icon.xpm
Type=Application
StartupNotify=true
Categories=Development;IDE;Building;Debugger;
MimeType=text/plain;
@DevWurm
DevWurm / functionalSum.scm
Created Dec 6, 2015
Scheme procedures, which sum up numbers, for demonstrating the difference between functional and imperative paradigm
View functionalSum.scm
; calculating the sum of all numbers between start and end (including start and end)
(define functionalSum
(lambda (start end)
(if (= end start)
end
(+ end
(functionalSum
start
(- end 1))))))
View article-selector.component.html
<h3>
{{title}}
</h3>
<vaadin-grid #articlesList [items]="gridData" [(size)]="gridSize" selection-mode="multi" (selected-items-changed)="updateSelection(articlesList.selection, articlesList.getItem.bind(articlesList))" (sort-order-changed)="updateSorting(articlesList.sortOrder, articlesList)">
<table>
<colgroup>
<col name="article" sortable="">
</colgroup>
<thead>
<tr>
@DevWurm
DevWurm / mapping.json
Last active Aug 25, 2016
Elasticsearch Query
View mapping.json
{
"settings": {
"number_of_shards" : 10,
"number_of_replicas" : 0
},
"mappings": {
"article": {
"properties": {
"name": {"type": "string"},
"counts": {
@DevWurm
DevWurm / paper-tooltip.html
Last active Aug 26, 2016
paper-tooltip jsbin version
View paper-tooltip.html
<!--
@license
Copyright (c) 2015 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
-->
@DevWurm
DevWurm / remove.sh
Created Sep 30, 2016
Remove all unused docker images from local cache
View remove.sh
#!/bin/bash
docker rmi $(docker images | tail -n +2 | awk '{ print $3; }' | tr '\n' ' ')
@DevWurm
DevWurm / jira.service
Last active Nov 18, 2016
Jira Systemd Unit (with postgresql setup)
View jira.service
[Unit]
Description=Jira Issue & Project Tracking Software
Requires=postgresql.service
After=postgresql.service
After=network.target
[Service]
Type=forking
User=jira
PIDFile=/opt/atlassian/jira/work/catalina.pid
You can’t perform that action at this time.