Archive for May, 2008

31
May

Principales commandes Linux

alias    Create an alias
apropos  Search Help manual pages (man -k)
awk      Find and Replace text, database sort/validate/indexbreak    Exit from a loop
builtin  Run a shell builtin
bzip2    Compress or decompress named file(s)

cal      Display a calendar
case     Conditionally perform a commandcat      Display the contents of a file
cd       Change Directory
cfdisk   Partition table manipulator for Linuxchgrp    Change group ownershipchmod    Change access permissionschown    Change file owner and group
chroot   Run a command with a different root directorycksum    Print CRC checksum and byte counts
clear    Clear terminal screen
cmp      Compare two files
comm     Compare two sorted files line by line
command  Run a command - ignoring shell functions
continue Resume the next iteration of a loopcp       Copy one or more files to another locationcron     Daemon to execute scheduled commands
crontab  Schedule a command to run at a later timecsplit   Split a file into context-determined pieces
cut      Divide a file into several parts

date     Display or change the date & time
dc       Desk Calculator
dd       Data Dump - Convert and copy a file
ddrescue Data recovery tool
declare  Declare variables and give them attributesdf       Display free disk spacediff     Display the differences between two filesdiff3    Show differences among three files
dig      DNS lookup
dir      Briefly list directory contents
dircolors Colour setup for `ls’dirname  Convert a full pathname to just a path
dirs     Display list of remembered directories
du       Estimate file space usage

echo     Display message on screen
egrep    Search file(s) for lines that match an extended expression
eject    Eject removable media
enable   Enable and disable builtin shell commands
env      Environment variables
ethtool  Ethernet card settings
eval     Evaluate several commands/arguments
exec     Execute a command
exit     Exit the shell
expand   Convert tabs to spaces
export   Set an environment variable
expr     Evaluate expressions

false    Do nothing, unsuccessfully
fdformat Low-level format a floppy disk
fdisk    Partition table manipulator for Linux
fgrep    Search file(s) for lines that match a fixed string
file     Determine file type
find     Search for files that meet a desired criteria
fmt      Reformat paragraph text
fold     Wrap text to fit a specified width.
for      Expand words, and execute commands
format   Format disks or tapes
free     Display memory usage
fsck     File system consistency check and repair
ftp      File Transfer Protocol
function Define Function Macros

gawk     Find and Replace text within file(s)
getopts  Parse positional parameters
grep     Search file(s) for lines that match a given pattern
groups   Print group names a user is in
gzip     Compress or decompress named file(s)

hash     Remember the full pathname of a name argument
head     Output the first part of file(s)history  Command History
hostname Print or set system name

id       Print user and group id’s
if       Conditionally perform a command
ifconfig Configure a network interface
import   Capture an X server screen and save the image to file
install  Copy files and set attributes

join     Join lines on a common field

kill     Stop a process from running

less     Display output one screen at a time
let      Perform arithmetic on shell variables
ln       Make links between files
local    Create variables
locate   Find files
logname  Print current login name
logout   Exit a login shell
look     Display lines beginning with a given string
lpc      Line printer control program
lpr      Off line print
lprint   Print a file
lprintd  Abort a print job
lprintq  List the print queue
lprm     Remove jobs from the print queue
ls       List information about file(s)
lsof     List open files

make     Recompile a group of programs
man      Help manual
mkdir    Create new folder(s)
mkfifo   Make FIFOs (named pipes)
mkisofs  Create an hybrid ISO9660/JOLIET/HFS filesystem
mknod    Make block or character special files
more     Display output one screen at a time
mount    Mount a file system
mtools   Manipulate MS-DOS files
mv       Move or rename files or directories

netstat  Networking information
nice     Set the priority of a command or job
nl       Number lines and write files
nohup    Run a command immune to hangups
nslookup Query Internet name servers interactively

passwd   Modify a user password
paste    Merge lines of files
pathchk  Check file name portability
ping     Test a network connection
popd     Restore the previous value of the current directory
pr       Prepare files for printing
printcap Printer capability database
printenv Print environment variables
printf   Format and print data
ps       Process status
pushd    Save and then change the current directory
pwd      Print Working Directory

quota    Display disk usage and limits
quotacheck Scan a file system for disk usage
quotactl Set disk quotas

ram      ram disk device
rcp      Copy files between two machines.
read     read a line from standard input
readonly Mark variables/functions as readonly
remsync  Synchronize remote files via email
return   Exit a shell function
rm       Remove files
rmdir    Remove folder(s)
rsync    Remote file copy (Synchronize file trees)

screen   Terminal window manager
scp      Secure copy (remote file copy)
sdiff    Merge two files interactively
sed      Stream Editor
select   Accept keyboard input
seq      Print numeric sequences
set      Manipulate shell variables and functions
sftp     Secure File Transfer Program
shift    Shift positional parameters
shopt    Shell Options
shutdown Shutdown or restart linux
sleep    Delay for a specified time
sort     Sort text files
source   Run commands from a file `.’
split    Split a file into fixed-size pieces
ssh      Secure Shell client (remote login program)
strace   Trace system calls and signals
su       Substitute user identity
sum      Print a checksum for a file
symlink  Make a new name for a file
sync     Synchronize data on disk with memory

tail     Output the last part of files
tar      Tape ARchiver
tee      Redirect output to multiple files
test     Evaluate a conditional expression
time     Measure Program running time
times    User and system times
touch    Change file timestamps
top      List processes running on the system
traceroute Trace Route to Host
trap     Run a command when a signal is set(bourne)
tr       Translate, squeeze, and/or delete characters
true     Do nothing, successfully
tsort    Topological sort
tty      Print filename of terminal on stdin
type     Describe a command

ulimit   Limit user resources
umask    Users file creation mask
umount   Unmount a device
unalias  Remove an alias
uname    Print system information
unexpand Convert spaces to tabs
uniq     Uniquify files
units    Convert units from one scale to another
unset    Remove variable or function names
unshar   Unpack shell archive scripts
until    Execute commands (until error)
useradd  Create new user account
usermod  Modify user account
users    List users currently logged in
uuencode Encode a binary file uudecode Decode a file created by uuencode

v        Verbosely list directory contents (`ls -l -b’)
vdir     Verbosely list directory contents (`ls -l -b’)
vi       Text Editor

watch    Execute/display a program periodically
wc       Print byte, word, and line counts
whereis  Report all known instances of a command   
which    Locate a program file in the user’s path.
while    Execute commands
who      Print all usernames currently logged in
whoami   Print the current user id and name (`id -un’)
wget     Retrieve web pages or files via HTTP, HTTPS or FTP

xargs    Execute utility, passing constructed argument list(s)
yes      Print a string until interrupted

.        Run a command script in the current shell

29
May

Ovh: Quelques commandes linux pour la gestion des users

Comment connaître les users crées sur le serveur ?

cat /etc/passwd

 

cat /etc/issue

27
May

red5 invokeOnAllConnections : scope global

Mots clés Technorati : ,

 

RED5 Pour faire un appel global sur le scope de inapplication sous RED5, il suffit d’obtenir le scope de l’ applications lors de l’ événement onAppStart

 

public boolean appStart(IScope app) {
    appScope = app;
    return true;
}    

Il ne reste plus qu’à appeler sur le scope global:

 

ServiceUtils.invokeOnAllConnections(appScope, “joinNewUser”,new Object[] {id,pseudo,room,sex,webcam,Integer.parseInt(coins),isModel});

25
May

Spmicillin: logiciel anti spam gratuit pour Outlook express

image

Logiciel Anti Spam Facile et 100% AUTOMATIQUE

Spamicillin est entièrement AUTOMATIQUE: Il n’y a aucune configuration à faire. Le logiciel s’actualise automatiquement ! A la réception des messages, SPAMICILLIN intercepte les messages et les analyse avant d’ appliquer des filtres Outlook express et supprimer les messages indésirables !L’ utilisateur utilise Outllok express comme à son habitude et le filtrage des emails est entièrement automatique ! Il n’a y aucun logiciel à lancer avant Outlook Express, aucune configuration à faire, aucun mot clef à entrer !

20
May

Shape, sprite: conversion en UIComponent impossible

Mots clés Technorati : ,,,,

 

Pour ceux qui essayent de compiler sous Flex du AS3 fait pour Flash9 et obtiennent souvent des erreurs de style:

“TypeError: Error #1034: Echec de la contrainte de type : conversion de flash.display::Shape @4bca0f9 en mx.core.IUIComponent impossible.”

 

Cette erreur vient du fait que l’ application d’ origine de Flex est un CANVAS qui n’ accepte que des composants dérivant de IUIComponent. Or Shape ou Sprite ne sont pas des composants ! Donc il ne faut pas utiliser le Canvas mais un autre composant qui accepte les sprites et shapes !

2 solutions :

1) faire hériter Shape de IUIComponent (lourd)

2) Créer un composant container à partir de UIComponent et le placer dans le stage, qu’on appellera “container” pas exemple
Ensuite il suffira de faire un container.addChild sur les shapes ou les sprites !

19
May

Delphi effacer cookies ou session dans un TWebbrowser

 

var
  document: IHTMLDocument2;
  cookies: String;
begin
  document := WebBrowser.Document as IHTMLDocument2;
  if Assigned(document) then document.cookie=;

Ceci est nécessaire quand on essaye d’ injecter des données via HTTP POST par exemple

15
May

amhPHP autoincrement number avec Mysql

Exemple de code pour créer un champ auto incrémental. Assez curieusement, après avoir initialisé la variable @m, vous ne pouvez plus suivre le SQL : il faut donc faire une deuxième requête.

 function getTop10() {
    $sql=”SET @m:=0″;
    $res = mysql_query($sql) or die (mysql_error());
    // il faut le faire en deux étapes !
    $sql=”select @m:=@m+1 as pos, username, coins, wins,losses,lowest from player order by coins DESC LIMIT 0,10″;
    $res = mysql_query($sql) or die (mysql_error());

    while ($row = mysql_fetch_array($res)) $ArrayResult[] = $row;
    return $ArrayResult;

} 

 

Il ne reste plus qu’à récupérer le résultat sous FLEX dans un dataProvider.source !

14
May

flex text et autosize

Mots clés Technorati :

Pour redimensionner (auto size) un composant TEXT sous FLEX, il suffit d’ intercepter  l”événement CHANGE et de le redimensionner suivant la propriété textHeight

 

public function update():void            {
        src.explicitHeight = src.textHeight + 10;
} 

 <mx:TextArea id=“src” text=“Hello world” change=“update()”/> 

11
May

flex: cloner un objet

public function clone(source:Object):* {
    var myBA:ByteArray = new ByteArray();
    myBA.writeObject(source);
    myBA.position = 0;
    return(myBA.readObject());
}

 

 

Ceci ne marche que pour des objets non graphiques.

09
May

flex styler un le HdividedBox : dividerSkin

Pour enlever un effet de traits sur le hdividedBox, il suffit de le styler avec une classe nulle:

Mots clés Technorati : ,
<mx:Style>
HDividedBox
{
dividerSkin: ClassReference(null);
}
</mx:Style>