Skip to content

Instantly share code, notes, and snippets.

use 5.010;
use strict;
use warnings;
# ---
open my $fh_read, '<', 'numbers.txt' or die "can't read shit";
while (<$fh_read>) {
@smujohnson
smujohnson / ircsed
Last active September 13, 2015 15:27 — forked from izabera/ircsed
a simple irc bot written in sed
#!/bin/bash
owner=izabera nick=sedirc network=irc.freenode.net
echo "
# send bot data
1 {
s/.*/nick $nick/p
s/.*/user $nick $nick $nick :$nick/p
s/.*/cat factoids 2>\/dev\/null/e; H
b
#!/usr/bin/perl
use 5.010;
use strict;
use warnings;
# ---
sub repl {
While connecting using FileZilla 3.7.4.1 under MS-Windows.
Response: 220 ProFTPD 1.3.0a Server (mockup FTP Service) [10.0.0.42]
Command: AUTH TLS
Response: 234 AUTH TLS successful
Status: Initializing TLS...
Error: GnuTLS error -12: A TLS fatal alert has been received.
Error: Could not connect to server
Status: Waiting to retry...
sjohnson@web1:~$ start="i am a"
sjohnson@web1:~$ echo $(args $start fat pig)
$VAR1 = 'i'; $VAR2 = 'am'; $VAR3 = 'a'; $VAR4 = 'fat'; $VAR5 = 'pig';
sjohnson@web1:~$ echo $(args "$start" fat pig)
$VAR1 = 'i am a'; $VAR2 = 'fat'; $VAR3 = 'pig';
sjohnson@biebler:~$ sudo gem install zipruby
Building native extensions. This could take a while...
ERROR: Error installing zipruby:
ERROR: Failed to build gem native extension.
/usr/bin/ruby1.8 extconf.rb
extconf.rb:1:in `require': no such file to load -- mkmf (LoadError)
from extconf.rb:1
00 | ############################## | 3.4%
01 | ################################### | 4.0%
02 | ######################### | 2.9%
03 | ######################### | 2.9%
04 | ###################################### | 4.3%
05 | ############################################ | 5.0%
06 | ############################### | 3.5%
07 | ############################################ | 4.9%
08 | #################################################### | 5.9%
09 | ################################################# | 5.5%
11:59:01 weechat | Key:
11:59:01 weechat | ctrl-P => /complete_word
11:59:04 weechat |
11:59:04 weechat | Key:
11:59:04 weechat | ctrl-N => /complete_word reverse
sjohnson@web1:~/http$ animal() { echo pig ; }
sjohnson@web1:~/http$ animal
pig
sjohnson@web1:~/http$ type animal
animal is a function
animal ()
{
echo pig
}
sjohnson@web1:~/http$ unset animal
sjohnson@web1:/tmp/sjohnson$ insert
^C
Traceback (most recent call last):
File "/usr/lib/command-not-found", line 8, in <module>
sjohnson@web1:/tmp/sjohnson$ import CommandNotFound
File "/usr/lib/python2.6/dist-packages/CommandNotFound/__init__.py", line 1, in <module>
from CommandNotFound import CommandNotFound
File "/usr/lib/python2.6/dist-packages/CommandNotFound/CommandNotFound.py", line 5, in <module>
from util import gettext_wrapper as _
File "/usr/lib/python2.6/dist-packages/CommandNotFound/util.py", line 5, in <module>