Skip to content

Instantly share code, notes, and snippets.

View raspi's full-sized avatar

raspi

  • finland
  • 00:55 (UTC +03:00)
View GitHub Profile
@raspi
raspi / Web hosting.md
Last active August 29, 2015 13:57
Web hosting in ISP's perspective (WIP)

Existing software

  • CPanel
  • ISPConfig
  • Webmin

Base software

  • CoreOS
  • Docker (LXC containers)

Hierarcy

@raspi
raspi / MQ VPN.md
Last active August 29, 2015 13:57
MQ based VPN (WIP)
@raspi
raspi / MQ filesystem.md
Created March 28, 2014 17:36
MQ based filesystem (WIP)

MQ based filesystem

  • There's FUSE for mounting filesystems
  • FUSE to MQ
@raspi
raspi / pf.conf
Created April 1, 2014 22:52
FreeBSD pf.conf (firewall)
# SSH
pass in quick proto tcp from any to port 22 keep state
@raspi
raspi / rm_only_one_file.py
Created May 31, 2014 08:34
Remove file from directory if it's the only one there including sub-directories.
#!/bin/env/python
# -*- encoding: utf8 -*-
# Remove file from directory if it's the only one there including sub-directories.
# usage: script.py <file to find> <directory>
# script.py readme.txt /stuff/files/misc
import os
import sys
fn = None
def is_vatnum(num):
if len(num) > 9:
return False
if "-" not in num:
return False
n,check = num.split("-")
try:
@raspi
raspi / RemoteMachineSetup.md
Last active October 22, 2015 09:43
Remote desktop

Environment

  • All machines are local
  • Multiple cheap "stupid" viewer client machines
  • One hypervisor which is used by these client machines

Techs

  • RDP
  • VNC
  • PCoIP
  • Direct video stream
@raspi
raspi / mixcloud2cue.py
Last active December 22, 2015 23:09
Convert mixCloud set to .cue file
#!/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
raspi / sherlock_holmes_awakened_audio_extract.py
Created January 15, 2014 09:36
Get audio .ogg files from game "Sherlock Holmes - The Awakened"
# 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]
@raspi
raspi / telnet irc.txt
Created January 15, 2014 10:39
Miten irkataan telnetillä
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>