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
#!/bin/bash | |
iuser="boby me me and me" | |
pipe_it() { | |
echo "$iuser" | awk '{print $1}' | |
} | |
heredoc_it() { | |
awk '{print $1}' <<< "$iuser" |
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
<?php | |
interface øList { | |
function getHead(); | |
function getTail(); | |
} | |
class øSimpleList implements øList { | |
function __construct($head, øList $tail) |
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
import Criterion | |
import Criterion.Main (defaultMain, bench) | |
-- Chris Forno 2008-09-03 | |
isPalindromeLastInit :: (Eq a) => [a] -> Bool | |
isPalindromeLastInit [] = False | |
isPalindromeLastInit (x:[]) = True | |
isPalindromeLastInit (x:y:[]) = x == y | |
isPalindromeLastInit (x:xs) = x == last xs && isPalindromeLastInit (init xs) |
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
#!/bin/bash | |
#original idea: http://ubuntuforums.org/archive/index.php/t-1012637.html | |
installed=$(dpkg --get-selections | grep -e "^linux-image-2\.[0-9]\." | awk '{print $1}' | sort -u | tail -1) | |
running="linux-image-$(uname -a | awk '{print $3}')" | |
echo | |
echo -n 'Reboot needed: ' | |
if [ "$installed" != "$running" ]; then |
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
<div> | |
<h2>Tests for common HTML elements | |
</h2> | |
<hr> | |
<h5>PARAGRAPHS | |
<span>& | |
</span> BOXES | |
</h5> |