Recent posteets

Sort by: Date / Title /

  1. 9 years ago by iegorka
    1. Groups multiple tokens together without creating a capturing group. This allows you to apply quantifiers to the full group.
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1747"></script>
  2. 7 years ago by neorom
    1. /etc/pure-ftpd/conf/PassivePortRange
    2.  
    3.  
    4. 50000 50100
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2127"></script>
  3. 9 years ago by stephanzr
    L'image qui servira de fond pour signaler le chargement (barre, cercle, etc...) sera visible jusqu'à ce que l'image à afficher finisse de se charger et recouvre l'image de fond... Voir sur le lien de la source les différentes manières d'utiliser ce principe.
    1. .load{background:url('images/youricon.gif') no-repeat center;}
    2.  
    3. <div class="load" style="width:200px;height:200px">
    4.     <img src="large.jpg" alt="alternate text" />
    5. </div>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2004"></script>
  4. sponsorised links
  5. 8 years ago by macks
    1. #---libs/date.py
    2. def format_date(value, format="%d/%m/%Y %H:%M:%S"):
    3.         return value.strftime(format)
    4.  
    5. #-----settings
    6. from libs.filters import format_date
    7. from jinja2 import Environment, FileSystemLoader
    8. TEMPLATE_ENV.filters["format_date"] = format_date
    9.  
    10. #---template
    11. <td>{{ h.date|format_date('%d/%m/%Y') }}</td>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2104"></script>
  6. 9 years ago by macks
    agregar una columna despues de otra
    1. ALTER TABLE media add COLUMN  status VARCHAR (20) after component
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1780"></script>
  7. 9 years ago by jacinmontava
    1. function alertPhp($texto){
    2.         echo "<script type='text/javascript'>alert('".$texto."');</script>";
    3. }
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1783"></script>
  8. 5 years ago by spirit
    1. #Adding/Modifying Rules
    2.  
    3. #    Watch for files
    4.  
    5. auditctl -w /etc/yum.conf -p wa  -k yum_watch
    6. auditctl -w /usr/bin/nmap -p x   -k nmap_watch
    7. auditctl -w /etc/shadow   -p rwa -k shadow_watch
    8.  
    9. #    Remove a rule using auditctl
    10.  
    11. auditctl -W /etc/shadow -p rwa -k shadow_watch
    12.  
    13. #    Watching for ptrace system call
    14.  
    15. auditctl -a entry,always -F arch=b64 -S ptrace -k info_scan
    16.  
    17. #    Suppress 32bit clock_gettime & fstat64 system calls
    18.  
    19. -a entry,never -F arch=b32 -S clock_gettime -k clock_gettime
    20. -a entry,never -F arch=b32 -S fstat64 -k fstat64
    21.  
    22. #    Audit files opened by a specific user
    23.  
    24. auditctl -a exit,always -S open -F auid=2010
    25. auditctl -a exit,always -F arch=b64 -F auid=2010  -F uid=2010 -F path=/etc/hosts -S open
    26.  
    27. #    Audit unsuccessful attempts for multiple system calls where user id is greater than or equal to 500
    28.  
    29. auditctl -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EACCES -F auid>=500
    30. auditctl -a always,exit -F arch=b32 -S creat -S open -S openat -S truncate -S ftruncate -F exit=-EPERM -F auid>=500
    31.  
    32. #Reporting/Searching
    33.  
    34. #    List all rules
    35.  
    36. auditctl -l
    37.  
    38. #    List status
    39.  
    40. auditctl -s
    41.  
    42. #    Report on watched files. Date format is local to the server's date format.
    43.  
    44. aureport -f
    45. aureport -f --start 02/18/10 17:42:00
    46. aureport -f --start 02/18/10 17:00:00 --end 02/18/10 17:10:00
    47. aureport -f -ts this-week
    48. aureport -f -ts today
    49.  
    50. #    Search by system call
    51.  
    52. ausearch -sc ptrace -i
    53.  
    54. #    Search for user id or effective user id
    55.  
    56. ausearch -ui 2010
    57. ausearch -ue 2010
    58.  
    59. #    Lists all auth attempts and their result
    60.  
    61. aureport -au
    62.  
    63. #    List just logins
    64.  
    65. aureport -l
    66.  
    67. #    List account modification attempts.
    68.  
    69. aureport -m
    70.  
    71. #    Search events where success value is no, User id is 500 and key is nmap_watch
    72.  
    73. ausearch -sv no -ua 500 -k nmap_watch
    74.  
    75. #    Search by executable
    76.  
    77. ausearch -x /usr/bin/nmap
    78.  
    79. #    Search by terminal
    80.  
    81. ausearch -tm pts/0
    82.  
    83. #    Search by daemon. Stuff like cron log terminal as the daemon name
    84.  
    85. ausearch -tm cron
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2171"></script>
  9. 3 years ago by sox
    Add this line in /etc/lightdm/lightdm.conf:
    
    greeter-setup-script=/usr/bin/synergyc <OPTIONS> <SERVER HOSTNAME>
    session-setup-script=/usr/bin/killall -w synergyc
    ession-cleanup-script=/usr/bin/killall -w synergy
    display-stopped-script=/usr/bin/killall -w synergyc
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/2261"></script>
  10. 9 years ago by benoitbalon
    1. mysqldump -h localhost -u user -ppassword -r/tmp/mysql_backup.data nomdatabase
    2.  
    3. mysql -h localhost -u user -ppassword nomdatabase < /tmp/mysql_backup.data
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1761"></script>
  11. 9 years ago by inbox
    Code pour vos pages en Php
    1. function bbcode($text) {
    2.     $text = preg_replace("#\[img\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/img\]#sie", "'<img src=\\1' . str_replace(' ', '%20', '\\3') . '>'",
    3. $text);
    4.     $text = preg_replace("#\[url\]((ht|f)tp://)([^\r\n\t<\"]*?)\[/url\]#sie", "'<a href=\"\\1' . str_replace(' ', '%20', '\\3') . '\" target=blank>\\1\\3</a>'", $text);
    5.     $text = preg_replace("/\[url=(.+?)\](.+?)\[\/url\]/", "<a href=$1 target=_blank>$2</a>", $text);
    6.     $text = preg_replace("/\[b\](.+?)\[\/b\]/", "<b>$1</b>", $text);
    7.     $text = preg_replace("/\[i\](.+?)\[\/i\]/", "<i>$1</i>", $text);
    8.     $text = preg_replace("/\[u\](.+?)\[\/u\]/", "<u>$1</u>", $text);
    9.     $text = preg_replace("/\[code\](.+?)\[\/code\]/", "<table width=100%><tr><th align=left>Code :</th></tr><tr><td align=left><code>$1</code></td></tr></table>", $text);
    10.     $text = preg_replace("/\[quote=(.+?)\]/", "<center><table width=80%><tr><th align=left>Message de $1 :</th></tr><tr><td align=left class=milieu_messages>", $text);
    11.     $text = preg_replace("/\[\/quote\]/", "</td></tr></table></center>", $text);
    12.     $text = preg_replace("/\[color=(.+?)\](.+?)\[\/color\]/", "<font color=$1>$2</font>", $text);
    13.     return $text;
    14.     }
    15.  
    16. EXEMPLE:
    17.     <tr>
    18.         <td width=394 height=3>
    19.             <p><font color=#FFFFFF>".bbcode(nl2br($mess))."</font></p>
    20.         </td>
    21.     </tr>
    Paste this in your website: <script type="text/javascript" src="http://www.posteet.com/embed/1709"></script>

First / Previous / Next / Last / Page 1 of 23 (223 posteets)