First we need lsusb
command from the usbutils
package.
> nix-env -i usbutils
> lsusb
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 011: ID 0403:6001 FTDI FT232 USB-Serial (UART) IC
Map | Action |
---|---|
<F1> | Causes Netrw to issue help |
<cr> | Netrw will enter the directory or read the file |
<del> | Netrw will attempt to remove the file/directory |
- | Makes Netrw go up one directory |
a | Toggles between normal display, hiding (suppress display of files matching g:netrw_list_hide) showing (display only files which match g:netrw_list_hide) |
c | Make browsing directory the current directory |
C | Setting the editing window |
d | Make a directory |
# Save this file (after modifying ID_VENDOR and ID_MODEL if necessary) as /etc/udev/rules.d/81-thinkpad-dock.rules | |
# These values seem to work for "ThinkPad Mini Dock Plus Series 3" | |
SUBSYSTEM=="usb", ACTION=="add|remove", ENV{ID_VENDOR}=="17ef", ENV{ID_MODEL}=="100a", RUN+="/etc/sbin/thinkpad-dock.sh" |
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Cwd; | |
# Opening a new window. | |
# Fixed version of script from | |
# http://lists.schmorp.de/pipermail/rxvt-unicode/2012q3/001609.html | |
# by José Romildo Malaquias <malaquias at gmail.com> |
\ProvidesFile{absender.lco} | |
\KOMAoptions{% | |
% fromemail=true, % Email wird im Briefkopf angezeigt | |
% fromphone=true, % Telefonnumer wird im Briefkopf angezeigt | |
% fromfax=true, % Faxnummer wird im Briefkopf angezeit | |
% fromurl=true, % URL wird im Briefkopf angezeigt | |
% fromlogo=true, % Logo wird im Briefkopf angezeigt | |
% subject=titled, % Druckt "Betrifft: " vor dem Betreff | |
locfield=wide, % Breite Absenderergänzung (location) |
The [RFC for a new simple to use password hashing API][rfc] has just been accepted for PHP 5.5. As the RFC itself is rather technical and most of the sample codes are something you should not use, I want to give a very quick overview of the new API:
Everybody knows that you should be hashing their passwords using bcrypt, but still a surprising number of developers uses insecure md5 or sha1 hashes (just look at the recent password leaks). One of the reasons for this is that the crypt() API is ridiculously hard to use and very prone to programming mistakes.
#!/bin/bash | |
# Adapted from Erik Johnson's script at | |
# http://terminalmage.net/2011/11/17/setting-a-usb-headset-as-the-default-pulseaudio-device/ | |
# | |
# Updated by Edward Faulkner <[email protected]> to move existing | |
# streams and eliminate the extra fork script. | |
# You'll need to change these to point at your headset device. | |
OUTPUT="alsa_output.usb-Generic_FREETALK_Everyman_0000000001-00-Everyman.analog-stereo" |
Base URL: http://translate.google.com/translate_tts
It converts written words into audio. It accepts GET
requests.
q
The query string to convert to audio
tl
Translation language, for example, ar
for Arabic, or en-us
for English
function ltrim(s) { sub(/^[ \t\r\n]+/, "", s); return s } | |
function rtrim(s) { sub(/[ \t\r\n]+$/, "", s); return s } | |
function trim(s) { return rtrim(ltrim(s)); } | |
BEGIN { | |
# whatever | |
} | |
{ | |
# whatever | |
} | |
END { |