This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<p>Here is some <code>inline code text</code>, and below is a code box:</p><div class="code">% perl -le 'print "div.code"'<br />% print $shell</div><p><pre><code>% print "This is pre-code" br <br /> | |
% print "no br" | |
% foo</code></pre></p> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* a dark style */ | |
* { | |
background: #303030; | |
font-family: 'Cousine', monospace; | |
} | |
body { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use File::Copy; | |
copy("file.html","file.html.orig"); | |
open(my $out, ">", "file.html.tmp"); | |
open(my $in, "<", "file.html"); | |
for ( @lines ) { | |
s/$pattern/${replacement}\n$pattern/g; | |
say $out $_; ######################################################### |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a comment | |
# the = should be treated as an operator | |
# anything before the = is an identifier or name | |
# anything after it is its value | |
# anything from a $, @, or % to a \s char is a variable (perl) | |
identifier = value | |
name2 = Anything after the \= is the value | |
# 'name2' => 'Anything after the = is the value' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use 5.010; | |
my $string = "This is the real string."; | |
system 'echo ' . "'" . '$string' . "'" . '> example.txt'; | |
# the command is: | |
# % echo '$string' > example.txt |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/zsh | |
out_html="$HOME/sandbox/pics.html" | |
top_dir="$HOME/sandbox/pics" | |
gal="$top_dir/gallery" | |
header="HEADER TEXT" | |
footer="FOOTER TEXT" | |
mklnk() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- add_pics_to_html_11.pl.orig 2011-07-25 13:12:25.000000000 -0400 | |
+++ add_pics_to_html_11.pl 2011-07-25 13:26:43.000000000 -0400 | |
@@ -4,6 +4,11 @@ | |
# lots of help by telemachus and dbbolton too | |
# license: GPL-3 | |
+## all my comments start with a double hash | |
+## -dbb | |
+ | |
+## general tips: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys | |
if len(sys.argv) < 2: | |
sys.exit('Usage: %s [INTEGER]' % sys.argv[0]) | |
try: | |
n = int( sys.argv[1] ) | |
except ValueError: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<form method="get" action="http://www.google.com/search"> | |
<a href="http://www.google.com/"><img src="favicon.ico" border="0px" /></a> | |
<input type="text" name="q" size="31" maxlength="255" value="" /> | |
<input type="submit" value="Search" /> | |
<input type="radio" name="sitesearch" value="" checked />Web | |
<input type="radio" name="sitesearch" value="en.wikipedia.org" />Wikipedia | |
</form> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<iframe src="http://duckduckgo.com/search.html?width=200&site=YOURSITE" style="overflow:hidden;margin:0;padding:0;width:248px;height:38px;" frameborder="0"></iframe> |