This file contains 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
/** | |
* Inspired by Qisen Tang, ref: http://www.woaitqs.cc/android/2017/04/11/new-way-to-add-header-and-footer.html | |
* | |
* <pre> | |
* <code> | |
* Usage: | |
* | |
* RecyclerViewAdapterWrapper adapterWrapper = | |
* RecyclerViewAdapterWrapper.wrap(new MyRecyclerViewAdapter()) | |
* .headerView(headerView) |
This file contains 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 Data.Char | |
data CaesarCipherShift = CipherShift Int | |
caesarEncode :: CaesarCipherShift -> String -> String | |
caesarEncode _ [] = [] | |
caesarEncode (CipherShift shiftCount) (x:xs) | |
| shiftedOrd > printableMax = | |
(chr $ ((shiftedOrd - 1 - printableMin) `mod` printableRange) + printableMin) : | |
(caesarEncode (CipherShift shiftCount) xs) |
This file contains 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 | |
port=$1 | |
if [[ $# -ne 1 ]]; then | |
echo "usage: $0 <port>" | |
exit 1 | |
fi | |
echo "will listen on $port, serve current directory" |
This file contains 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/perl | |
use strict; | |
use warnings; | |
my @args = splice(@ARGV, 0); | |
my @dimens; | |
my @dimenNameArray; | |
my %indexNameHash; |
This file contains 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 -w | |
use strict; | |
use warnings; | |
use Time::HiRes qw(usleep); | |
use Term::ANSIColor; | |
my $pkgName = $ARGV[0]; | |
my $watch = $ARGV[1]; | |
my @args = splice(@ARGV, 1); |