
在磁盘中创建备份目录 mkdir /media/usbdisk/mactimebak 推荐使用ext4分区(打开notime)
安装nettalk
| # create a new bare git repository | |
| cd ~/WualaDrive/username/repos | |
| mkdir project.git | |
| cd project.git | |
| git init --bare | |
| # clone | |
| cd ~/src | |
| git clone ~/WualaDrive/username/repos/project.git/ | |
| cd project.git |
| import sqlalchemy as sa | |
| import sqlalchemy.orm as orm | |
| from sqlalchemy.ext.declarative import declarative_base | |
| from sqlalchemy.ext.declarative import declared_attr | |
| from sqlalchemy.orm import scoped_session, sessionmaker | |
| DBSession = scoped_session(sessionmaker()) | |
| class BaseMixin(object): | |
| query = DBSession.query_property() | |
| id = sa.Column(sa.Integer, primary_key=True) |

在磁盘中创建备份目录 mkdir /media/usbdisk/mactimebak 推荐使用ext4分区(打开notime)
安装nettalk
| #!/bin/bash | |
| cat << ENDMSG | |
| This script enables you to remotely unlock a fully encrypted (dm-crypt/LUKS) Ubuntu 12.10 server via SSH. | |
| The script must be run as root (via sudo). | |
| Contains bits gratefully taken from | |
| http://hacksr.blogspot.com/2012/05/ssh-unlock-with-fully-encrypted-ubuntu.html and | |
| http://blog.nguyenvq.com/2011/09/13/remote-unlocking-luks-encrypted-lvm-using-dropbear-ssh-in-ubuntu/ |
MIT License
Copyright (c) [year] [fullname]
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:
| #!/bin/bash | |
| # http://stackoverflow.com/a/422123 | |
| # http://stackoverflow.com/questions/242538/unix-shell-script-find-out-which-directory-the-script-file-resides | |
| dir=$(dirname $(readlink -f "$BASH_SOURCE")) |
| import os | |
| import zlib | |
| from StringIO import StringIO | |
| ESTIMATED_COMPRESSION_FACTOR = 2 | |
| class UnzipStream(object): | |
| ''' |
| #include <stdio.h> | |
| #include <complex.h> | |
| #define dc double complex | |
| dc | |
| Y(dc | |
| V, | |
| dc B,dc c){ | |
| return | |
| (cabs (V)<6)?(c?Y(V *V+ | |
| B,B,c-1):c):(2+c-4*cpow |
credit:http://stackoverflow.com/a/62680
class Foo(object):
#...