Skip to content

Instantly share code, notes, and snippets.

View fmayer's full-sized avatar
🌴
On vacation

Florian Mayer fmayer

🌴
On vacation
View GitHub Profile
[ ~ ] % sudo smartctl --all /dev/sdb
smartctl version 5.38 [x86_64-unknown-linux-gnu] Copyright (C) 2002-8 Bruce Allen
Home page is http://smartmontools.sourceforge.net/
=== START OF INFORMATION SECTION ===
Model Family: Maxtor MaXLine III family (ATA/133 and SATA/150)
Device Model: Maxtor 7L300S0
Serial Number: L6090BVG
Firmware Version: BANC1G10
User Capacity: 300,090,728,448 bytes
# -*- coding: us-ascii -*-
# asynchia - asynchronous networking library
# Copyright (C) 2009 Florian Mayer
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# -*- coding: us-ascii -*-
# asynchia - asynchronous networking library
# Copyright (C) 2009 Florian Mayer
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
# The following lines were added by compinstall
path=($path ~/.bin /usr/local/bin /opt/scala/bin)
zstyle :compinstall filename '/home/name/.zshrc'
autoload -Uz compinit
compinit
# End of lines added by compinstall
# Lines configured by zsh-newuser-install
def tes_connfailed2(map_):
container = Container()
container.done = False
class Handler(asynchia.IOHandler):
def __init__(self, socket_map, sock=None, container=None):
asynchia.IOHandler.__init__(self, socket_map, sock)
self.container = container
def handle_connect_failed(self, err):
#include <stdlib.h>
#include <stdio.h>
#include <errno.h>
#include <sys/types.h>
#include <sys/socket.h>
struct mysend_ret {
ssize_t ret;
int errsv;
import sys
import time
import Queue
import threading
from PyQt4 import QtGui, QtCore
def blocking(parent, q):
time.sleep(2)
q.put((parent.inp.setText, ("Hello World", ), {}))
# Copyright (c) 2010 Florian Mayer <flormayer (at) aim (dot) com>
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
# The above copyright notice and this permission notice shall be included in
import math
def nth(x, n):
return int(
x / (10 ** int(math.log10(x) - n))
) % 10
str(nmb)[n]