Skip to content

Instantly share code, notes, and snippets.

@kralo
kralo / system-3S1000.ucf
Created October 21, 2013 20:38
ucf System File for Xilinx 3S1000 Spartan 3
## System ucf file For Spartan 3S100
## with aliases such as XSA-3S1000 Board / XST3 / 3S1000 ft256 / ...
## and the XST-3.0 XSTend Board V 3.0
## note: Column-edited with geany
##
## for further information see "Connections Between the XST-3.0 Board and the Various XSA Boards"
## on http://www.xess.com/static/media/manuals/xst-manual-v3_0.pdf#page=24
## marks a new section
@kralo
kralo / ex-clasification.scala
Created January 30, 2014 22:31
Example Implementation in Scala of Lloyd and Fuzzy-C-Means Clustering
/**
* Preface:
*
* this is an educational implementation of two algorithms for unsupervised learning.
* They may not follow every standard notation but I hope they are illustrative.
* I am neither the most versatile scala programmer, so there may always be a way to express
* things in a more idiomatic way.
*
* This example is not packaged so that you can run it easily via the scala REPL.
* try with scala <this_filename>.scala
@kralo
kralo / export-csv-moodle.php
Created August 13, 2014 08:45
Example boilerplate for csv export from moodle
<?php
/**
* Example for howto to serve a csv file for download in Moodle using the /lib/csvlib.class.php
* Very handy for exporting various data. This example demonstrates csv data export from within a moodle plugin
*
* This file is public domain where applicable,
* else GNU LGPL
*/
require_once '../../config.php'; // to include $CFG, for example
require_once ($CFG->libdir . '/csvlib.class.php');
@kralo
kralo / fritzbox-dyndns-update-multiple.php
Created August 25, 2014 20:45
php script to update multiple dyndns endpoints with one url
<?php
/**
* Quick and dirty script to update ipv4 and ipv6 records simultaneously by the fritz box ddns function.
* afraid.org offered only one-record-per-url so this takes the fritzbox input and makes two separate calls to afraid.org
* Fritzbox settings should be:
* url = point to this script. attach parameters auth_key, ipv4 and ipv6. Lookup the fritzbox help to find the parameter placeholder, should look like
* http://path-to-this-script.com/script.php?auth_key=<username>&ipv4=<ipaddr>&ipv6=<ip6addr>
* domain: your domain
* username: yourawesomekey below
@kralo
kralo / DSLXX_generator.mwe2
Created June 24, 2015 20:49
Example mwe2 Workflow for a code generator working on your own dsl
module de.example.crudDsl.generator
import org.eclipse.emf.mwe.utils.*
import de.example.crudDsl.generator.CrudToAppGeneratorSetup
import de.example.crudDsl.generator.CrudToAppGeneratorSupport
var targetDir = "src-gen"
var projectName = "Yourapp"
var baseProjectPath = "../../${projectName}"
var filePath = "../de.example.pizzaInDsl/" // where your model.dsl* files are
@kralo
kralo / demo-api-javascript-teamup.html
Created January 27, 2016 19:24
Small demo how to display an html widget for calendar events from the teamup API
<!DOCTYPE html>
<html>
<body>
<p>requirejs is used here in order to make the html snippet / widget work in the 1&1 MyWebsite </p>
<script src="https://cdnjs.cloudflare.com/ajax/libs/require.js/2.1.22/require.min.js"></script>
<div id="CalData"><p>Wird geladen...</p>
</div>
<script type="text/javascript">
require.config({
paths: {
#!/bin/sh
# ntrip caster authentication and data quick-check
# quick test with curl to see if you actually get some sort of data at your mountpoint (will be illigible, but anyway)
# note the ridiculous User-Agent check
# replace the caster url, port and mountpoint
curl -v http://igs-ip.net:2101/ABMF0 -u user:password --header "Ntrip-Version: Ntrip/2.0" --header "User-Agent: NTRIP curl"
@kralo
kralo / u-blox-m8n-1enable-sfrbx-rawx-hex.txt
Last active March 4, 2023 05:37
u-blox commands for activating SFRBX/RAWX (using RTKLIB) with M8N FW 3.01
# u-blox commands for activating SFRBX/RAWX (using RTKLIB) with M8N FW 3.01
# tested on an
# HW UBX-M8030 00080000*60
# EXT CORE 3.01 (107900)*33
# ROM BASE 2.01 (75331)*19
# FWVER=SPG 3.01*46
# PROTVER=18.00*11
# issue these commands in a terminal that supports sending HEX (e.g. ScriptCommunicator)
@kralo
kralo / howto-xorg-framebuffer-default-size.txt
Created April 14, 2018 06:33
[HOWTO] Configure Xorg/X11 Framebuffer default size when no monitor attached
# there is no monitor attached
$ xrandr -q -d :0
Screen 0: minimum 320 x 200, current 1920 x 1080, maximum 4096 x 4096
VGA-1 disconnected primary (normal left inverted right x axis y axis)
LVDS-1 disconnected (normal left inverted right x axis y axis)
DVI-D-1 disconnected (normal left inverted right x axis y axis)
DP-1 disconnected (normal left inverted right x axis y axis)
# Write in xorg.conf
@kralo
kralo / IKEV2C_0USER.ini
Last active February 21, 2023 15:02
[HOWTO] configuration example for lancom host to ubuntu 16.04 vpn client
[PROFILE1]
Name=T-IKEV2C_0USER
ConnMedia=21
ConnMode=0
SeamRoaming=1
PriVoIP=1
Gateway=1.2.3.4
PFS=14
UseComp=0
IkeIdType=3