Skip to content

Instantly share code, notes, and snippets.

View haslinger's full-sized avatar
🏠
Working from home

Stefan Haslinger haslinger

🏠
Working from home
View GitHub Profile
@haslinger
haslinger / page.html
Last active November 13, 2023 14:23
Super simple markdown to nice webpage with Showdown and Sakura
<link rel="stylesheet" href="https://unpkg.com/sakura.css/css/sakura.css" type="text/css">
<script type='text/javascript'src="https://cdnjs.cloudflare.com/ajax/libs/showdown/1.8.6/showdown.min.js"></script>
<div id="content">
# My first Webpage
Not too hard, isn't it?
</div>
<script>
@haslinger
haslinger / hwinfo
Last active January 5, 2018 12:31
Studio-Link on Laptop
============ start debug info ============
libhd version 21.50u (x86-64) [7688]
using /var/lib/hardware
kernel version is 4.13
----- /proc/cmdline -----
BOOT_IMAGE=/boot/vmlinuz-4.13.0-17-generic root=UUID=2d2ecf92-256a-4838-b641-d0ef7838fe72 ro quiet splash vt.handoff=7
----- /proc/cmdline end -----
debug = 0xff7ffff7
probe = 0x15938fcdaa17fcf9fffe (+memory +pci +isapnp +net +floppy +misc +misc.serial +misc.par +misc.floppy +serial +cpu +bios +monitor +mouse +scsi +usb -usb.mods +modem +modem.usb +parallel +parallel.lp +parallel.zip -isa -isa.isdn +isdn +kbd +prom +sbus +int +braille +braille.alva +braille.fhp +braille.ht -ignx11 +sys -bios.vbe -isapnp.old -isapnp.new -isapnp.mod +braille.baum -manual +fb +pppoe -scan +pcmcia +fork -parallel.imm +s390 +cpuemu -sysfs -s390disks +udev +block +block.cdrom +block.part +edd +edd.mod -bios.ddc -bios.fb -bios.mode +input +block.mods +bios.vesa -cpuemu.debug -scsi.noserial +wlan -bios.crc -hal +bios.vram +bios.acpi -bios.ddc.ports=0 +modules.pata -net.eeprom +x86e
@haslinger
haslinger / 00-learnings.md
Last active December 24, 2017 16:07
Studio Link on Linux
  • Compiling latest Ardour 5.12 using the How to Compile and Install Ardour on Ubuntu Linux from Source Code for Free works nicely for me.
  • There are Audio devices, that create a deadlock with Jack audio server. In my case: Jabra Speak 410.
  • An audio device, that works nicely, is a Zoom H6. And you can connect proper XLR mics to it. (That can be tricky in itself, depending on the phantom power needed, but that is a different story.)
  • If you use a Zoom H6 as an audio interface, direct monitoring is enabled by default. You want to disable this, because you want to monitor the Ardour monitor signal. This can be done at: [Menu] - [Input&OUTPUT] - [Direct-Monitor]
  • It's super important to have Jack startet with a sampling rate of 48kHz, otherwise the Studio Link inbound connections create
@haslinger
haslinger / docu.markdown
Last active November 6, 2017 11:33
Session mit Christian - 6.11.2017

Struktur Webseite am Server

  • Legt man in einen Ordner (= Verzeichnis, = Directory, = Folder) auf einem Webserver eine Datei index.htm oder index.html, dann wird diese Seite aufgerufen, wenn man das Verzeichnis im Browser aufruft. Bsp.: /meinverzeichnis/index.htm wird geparst, wenn im Browser http://www.gottfrieds.at/meinverzeichnis/ aufgerufen wird und auch /index.htm, wenn im Browser http://www.gottfrieds.at/ aufgerufen wird.
  • Ein neues Verzeichnis erstellt man in Filezilla durch Rechtsklick, den wir mit zwei Fingern am Touchpad ausgelöst haben.
  • Rechtsklick erzeugt am Mac mit CTRL + Klick
  • Im Kontextmenü zu einer Datei oder einem Verzeichnis gibt es auch Löschen oder Umbennennen
  • In ein Verzeichnis wechselt man durch Klick darauf, das geht auch am Server.
  • Dateien und auch Verzeichnisse kann man mit Drag and Drop in Filezilla kopieren und verschieben.
@haslinger
haslinger / Readme.md
Last active February 10, 2017 15:28
Using monit and a bash script to monitor another monit instance

Readme

Monit seems to block basic authentication requests from other monit instances with 501-not implemented for whatever reason (selling Mmonit? :-))

Let's solve this with a small bash script that leverages curl to download the status file in xml format and xmllint to parse the status file for the relevant status flag.

if everything goes fine, this shell script return silently.

@haslinger
haslinger / crontab
Last active February 8, 2017 18:05
Temperature monitor
# m h dom mon dow command
# User environment wrapper provided by .rvm
*/5 * * * * /home/username/.rvm/wrappers/ruby-2.3.3/ruby /var/scripts/temperature.rb
@haslinger
haslinger / guide.md
Last active March 27, 2018 18:46
Remark presentations in jekyll

Just three steps to integrate Remark.js:

  • Include remark.js.min in your /js folder
  • Create a presentation layout like this
  • Write presentation like this

-> Get a presentation like this!

@haslinger
haslinger / deploy
Last active October 10, 2016 07:20
Deploy a Phoenix app from a Git repo onto a Ubuntu server
#!/bin/bash
echo -e "\n\e[96m === Change into directory ===\e[0m"
cd phoenix_deployment/pan/
echo -e "\n\e[96m === Start ssh agent ===\e[0m"
eval `ssh-agent -s`
echo -e "\n\e[96m === Add identity ===\e[0m"
ssh-add
@haslinger
haslinger / have_xml.rb
Created July 26, 2016 08:13
have_xml matcher Rspec 3 compatible
module XMLMatchers
require 'libxml'
require 'rspec/expectations'
RSpec::Matchers.define :have_xml do |xpath, text|
match do |body|
parser = LibXML::XML::Parser.string body
doc = parser.parse
nodes = doc.find(xpath)

Installation of Phoenix on Ubuntu 16.04

  • Don't use the Ubuntu packages provided, instead:
wget https://packages.erlang-solutions.com/erlang-solutions_1.0_all.deb 
sudo dpkg -i erlang-solutions_1.0_all.deb
sudo apt-get update
sudo apt-get install esl-erlang elixir