Instantly share code, notes, and snippets.

Pekka Järvinen raspi

View GitHub Profile
#!/bin/env python
# -*- coding: utf8 -*-
# raspi 2013
# mixCloud set to .cue file
# version 0.0.1
import os
import sys
import json
import urllib2
# raspi 2007
# gets audio ogg files from "sherlock holmes - the awakened"
import os
import sys
import struct
datafilename = 'music.snd'
datafilesize = os.stat(datafilename)[6]
View telnet irc.txt
telnet <IRC serveri> <portti>
NICK <nick>
USER <ident/username> "localhost" "localhost" :<Nimi>
Oikea IRC clientti - TELNET
/j <#kanava> [key] = JOIN <#kanava> [:key]
/p <#kanava> = PART <#kanava>
/msg #kanava <viesti> = PRIVMSG <#kanava> :<viesti>
/msg <nick> <viesti> = PRIVMSG <nick> :<viesti>
View web.config EF6 Npgsql.EntityFramework example.xml
<?xml version="1.0" encoding="utf-8"?>
<!-- For more information on Entity Framework configuration, visit -->
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Culture=neutral" requirePermission="false" />
<compilation debug="true" targetFramework="4.5">
View Web

Existing software

  • CPanel
  • ISPConfig
  • Webmin

Base software

  • CoreOS
  • Docker (LXC containers)


View MQ
View MQ

MQ based filesystem

  • There's FUSE for mounting filesystems
  • FUSE to MQ
View pf.conf
pass in quick proto tcp from any to port 22 keep state
View smb.conf.ini
# Samba 4 config example
# Connected to existing remote Samba 4 Active Directory Directory Controller
# ZFS pool @ /storage
# Network is
# Samba is installed with:
# pkg install samba42
# and then joined to existing AD with:
# samba-tool domain join <params>
# After this /usr/local/etc/smb4.conf is edited and restarted with /usr/local/etc/rc.d/samba_server restart
# -*- encoding: utf8 -*-
# Remove file from directory if it's the only one there including sub-directories.
# usage: <file to find> <directory>
# readme.txt /stuff/files/misc
import os
import sys
fn = None