Posts

Showing posts from January, 2013

PGP toolkit in linux

Image
PGP toolkit in Linux Table of Contents 1 Philip R. Zimmermann 2 What is digital certificate? 3 X509 .VS. PGP 4 PGP tools in Linux platform 4.1 Generate your own self-signed Certificate 4.2 encypt and decrypt by gpg 4.3 Manager your Certificats 5 PGP in Emacs 5.1 Easy PG package in emacs 5.2 encrypt/sign email in gnus 5.3 epa-mail* .VS. mml-secure-message-* 1 Philip R. Zimmermann Zimmermann is the creator of Pretty Good Privacy(PGP) which become the standard of protocol named OpenPGP. In the era before 90s century, US government held a export restrictions for cryptography software(This bullshit policy sounds like censorship in china today right? But the different is that a lot of SOB in china government.). But Zimmermann made PGP as a open source software to counterattack government's violate human right behave(The human being's nature right is to pursual for freedom and equality, especially in Internet). This made him the target of a thre

tts-mode in emacs

TTS mode for emacs TTS mode for emacs There are a scene in The big-bang theory, a America TV drama, Sheldon use his laptop computer to emulate human voice. That's really cool. Actually What Sheldon did is just install a TTS software, TTS short for Text To Speech. Table of Contents 1 TTS engine in linux platform 2 The simple way to use Festival and Espeak 3 Why TTS mode? 4 How to use TTS mode? 1 TTS engine in linux platform I use two kinds of TTS engine in my PC, Festival and Espeak. Festival provide a interactive interface with lisp like syntax. Espeak support more language voice. Of course there are another TTS engines in linux platform, I just have a little experience in above two. 2 The simple way to use Festival and Espeak # festival read text from stdin echo "hello world" | festival --tts # festival read text from file festival --tts filename espeak "hello world" # espeak speak chinese espeak -

Linux Share Memory

Linux Share Memory Linux Share Memory Table of Contents 1 Introduction 2 tmpfs .vs. shm_open 3 shmget .vs. shm_open 1 Introduction Shared memory is one kinds of mechanism to do effective IPC. There are three kinds of API to share memory among different processes: shmget shm_open tmpfs 2 tmpfs .vs. shm_open df -h This command can list the mounted file systems. In general, there will be a record:   tmpfs 1.9G 748K 1.9G 1% /dev/shm tmpfs is one kinds of file system which store the file data in virtual memory instead of hard disk. It can speed up the program which needs temp storage. Because of its file store in virtual memory, It can be used as a shared memory facility. While according to shm_open's manual, the name parameter of shm_open is actually an object name, not a file path. So I read glibc's source code and find the definition the shm_open, It just concatenate tmpfs path name with the

Alsa lisp in alsa-lib

Image
Alsa lisp in Alsa-lib Table of Contents 1 What is Alsa lisp? 2 Difference between lisp and alsa lisp. 3 Sample code 4 Why not make a alisp-mode for emacs? 1 What is Alsa lisp? Alsa lisp is a lisp interpreter provided by alsa-lib package, it can be used as a script language to configure alsa. Alsalisp is not installed default by alsa-lib, so you need to compile alsalisp from source code. It provide a simple example to make a tiny lisp interpreter from scratch. Of course we can make our own script language by wrapper alsa-lib functions with some script language like Gnu's guile. 2 Difference between lisp and alsa lisp. Alsa lisp just implemented basic syntax of lisp with some simple intrinsic function. But it does not support macro syntax, that's too complicated. Beside the simple syntax, alsa lisp implemented its own special intrinsic function to invoke alsa-lib native functions. Those alsa related intrinsic function include: static const

SELinux Introduction

SELinux Introduction I follow a tutorial named five minutes to install Wordpress. Guess, How much time did I spent to install the fucking Wordpress in my fedora OS? The whole afternoon. Everything is fine except I configure a virtual host for Wordpress server and restart Apache. Then the nightmare coming, I restart Apache again and again with Access denied 404 Error every time. Finally I guess maybe the SELinux's problem. Then everything is Ok after I disable the SELinux and restart the machine. A good tutorial of SELinux – security and SELinux Table of Contents 1 What's SELinux? 2 Some Simple SELinux suit Utilities Usage 2.1 Check current SELinux status 2.2 Check file's security context 2.3 change a file's security context 1 What's SELinux? SELinux is Linux feature that provides a mechanism for supporting strict access control security policies, short for Security-Enhanced Linux. The key concepts underlying SELinux can be traced to sev