Skip to content

Instantly share code, notes, and snippets.

sebastian krämer dotob

Block or report user

Report or block dotob

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
dotob / yaml
Created Sep 4, 2019
sample yaml
View yaml
# this job builds the project and its dependencies
stage: build
image: node:8
# only:
# changes:
# - r4c/**/*
# - types/**/*
- yarn run writeVersions
View sedoneliners.txt
USEFUL ONE-LINE SCRIPTS FOR SED (Unix stream editor) Dec. 29, 2005
Compiled by Eric Pement - pemente[at]northpark[dot]edu version 5.5
Latest version of this file (in English) is usually at:
This file will also available in other languages:
Chinese -
dotob / index.ts
Created Sep 16, 2016
express route per typescript decorator
View index.ts
import * as express from 'express';
var app = express();
app.get('/', function (req, res) {
res.send('Hello World!');
app.listen(3000, function () {
console.log('Example app listening on port 3000!');
dotob / checkmysql
Created May 16, 2016
small script to check if mysql is running and restart it if not
View checkmysql
echo "check mysql"
service mysql status | grep -qE [0-9]{5}
if [ $? -eq 0 ]; then
echo OK
service mysql start
echo "-" | mail -s " mysql restarted" -r
echo "mysql restarted, mail sent"
dotob / nojquery_table_select.html
Created Feb 11, 2016
select rows and columns in html without jquery
View nojquery_table_select.html
.selected {background-color: lightgrey;}
table {border:1px solid black;}
td {border:1px solid black;}
<script type="text/javascript">
// ready func for knowing when document is ready
dotob /
Created Jan 6, 2016
Directly render and serve d3 visualizations from a nodejs server.
# Start `coffee`
# Then visit http://localhost:1337/
# originally from:
d3 = require('d3')
http = require('http')
jsdom = require('jsdom')
http.createServer((req, res) ->
# Chrome automatically sends a requests for favicons
# Looks like isn't
dotob / gist:4034731
Created Nov 7, 2012
teamcity sample artifact vs. buildinfo
View gist:4034731
private Uri CreateArtefactUri(Build build) {
string finalArtifactName = string.Empty;
try {
string artifactInfoUriString = string.Format("http://{0}/guestAuth/repository/download/{1}/{2}/teamcity-ivy.xml", this.teamCityHost, this.buildType, build.Number);
using (WebClient wc = new WebClient()) {
var artefactInfo = wc.DownloadString(artifactInfoUriString);
XDocument artifactInfoXmlDoc = XDocument.Parse(artefactInfo);
foreach (var artifactElement in artifactInfoXmlDoc.Element("ivy-module").Element("publications").Elements("artifact").Where(e => e.Attribute("ext").Value == "exe")) {
var artifactName = artifactElement.Attribute("name").Value;
if (Regex.IsMatch(artifactName, this.artifactNameMatch)) {
dotob / transferhandler
Created Aug 15, 2012
filedragdrop handler
View transferhandler
// imports omitted, dont know why...
public class Foo extends TransferHandler {
//.../*DRAG &amp;amp; DROP*/
public boolean importData(JComponent comp, Transferable t) {
// Make sure we have the right starting points
if (!(comp instanceof JTextField)) {
return false;
dotob / rss2uli.rb
Created Jun 12, 2012
rss parsing with ruby and simplerss
View rss2uli.rb
require 'simple-rss'
require 'open-uri'
class RssReader
def parseFeed (url, length)
feed_url = url
result = SimpleRSS.parse open(feed_url)
output = "<html><meta charset=\"utf-8\"><body>";
output += "<h1>#{}</h1><br />"
result.items.each_with_index do |item, i|
You can’t perform that action at this time.