Skip to content

Instantly share code, notes, and snippets.

#!/usr/bin/perl
# Script to extract unique URLs from Squid access log file with URL regexp
use strict;
$| = 1;
my $report_rate = 99;
<?php
/**/
// включение подсчета времени генерирования страницы
$start_time = microtime(true);
//*/
// Управляемая буферизация вывода страницы
// так же для возможности отдачи файла с другим не буферизированным содержимым
function on_buffer($buffer) {
// заменить все "сукаблядь" на " (пиип) "
use strict;
use IO::Socket;
use Net::DHCP::Packet;
use Net::DHCP::Constants;
my $server_ip = "10.10.10.1";
my $client_ip = "10.10.10.10";
my $subnet_mask = "255.255.255.0";
#!/usr/bin/perl
# Sergey Storm, 6 of October 2016 at 22:21:22
use strict;
use warnings;
use Net::XMPP::Client;
my $debug = 0;
@SergeyStorm
SergeyStorm / kugel.txt
Last active October 11, 2016 15:36
Padre IDE syntax highlight theme "Kugel", ported from Geany.
name en-gb Kugel
# Padre Internal Editor Colours
style padre
StyleSetForeground PADRE_BLACK 000000
StyleSetForeground PADRE_BLUE 000099
StyleSetForeground PADRE_RED 990000
StyleSetForeground PADRE_GREEN 00aa00
#!/bin/bash
domain='dspeak2.vtiger.pinstudio.ru';
mysql_server_package='mysql-server-5.5';
mysql_root_passwd='***************';
crm_home='/var/www/crm';
crm_user='crm';
# 7
#crm_passwd=$(tr -dc '[:graph:]' < /dev/urandom | head -c ${1:-31};);
passwd_length=31;
<!DOCTYPE html>
<head>
<meta charset="utf-8">
<meta viewport="width=device-width">
<title>Canvas</title>
<style type="text/css">
html, body {
margin: 0;
padding: 0;
width: 100%;
#!/usr/bin/perl
# Perl Array vs Hash (using hash like an array)
# Script measures filling and fetching speeds of arrays and hashes in Perl 5
use strict;
use warnings;
use Time::HiRes qw( time );
import os
import sys
d = sys.argv[1]
subdirs = []
for o in os.listdir( d ):
if os.path.isdir( os.path.join( d, o )):
subdirs.append( os.path.join( d, o ) )
if '/home' in subdirs:
subdirs.remove( '/home' )
#!/usr/bin/perl
my $path = $ARGV[0];
if ( -d $path ) {
if ( opendir DIR, $path ) {
my @dirs;
for my $item ( readdir DIR ) {
if ( -d $path.$item ) {
next if $item =~ m|^home|;
next if $item =~ m|^..$|;