Skip to content

Instantly share code, notes, and snippets.

View cpanxaoc's full-sized avatar

Brian Manning cpanxaoc

View GitHub Profile
@cpanxaoc
cpanxaoc / gist:ca073029a61023b465a0
Created September 28, 2015 15:24
Programming problems/exercises
- For use in testing job applicants
- "Programming Problems"
- http://programmingbydoing.com/
- http://faculty.washington.edu/dchinn/how-not-to-code.pdf
- https://github.com/spicyjack/mystrcmp
- http://adriann.github.io/programming_problems.html
- http://users.csc.calpoly.edu/~jdalbey/103/Projects/ProgrammingPractice.html
- http://www.acsl.org/samples.htm
- http://cs.boisestate.edu/~amit/prog-contest/sample-problems.html
- http://people.cs.clemson.edu/~bcdean/dp_practice/ (Flash)
@cpanxaoc
cpanxaoc / gist:8d7473ba2ae10bd2d07b
Created August 23, 2015 18:02
Output of 'make -d' for G:O:I with new perli11ndoc script
GNU Make 3.81
Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.
This program built for i386-apple-darwin11.3.0
Reading makefiles...
Reading makefile `Makefile'...
Updating makefiles....
grep -v name Top1000.csv | awk -F',' '{print $1}' | sort -u | perl -nE'chomp($_); $_ = lc($_);say ucfirst($_) . q( ) . length($_);' | tee last_names.txt
utf8 "\x82" does not map to Unicode at /Users/cpanxaoc/.plenv/versions/5.20.2/lib/perl5/site_perl/5.20.2/Path/Tiny.pm line 1445.
utf8 "\xA8" does not map to Unicode at /Users/cpanxaoc/.plenv/versions/5.20.2/lib/perl5/site_perl/5.20.2/Path/Tiny.pm line 1445.
utf8 "\xBD" does not map to Unicode at /Users/cpanxaoc/.plenv/versions/5.20.2/lib/perl5/site_perl/5.20.2/Path/Tiny.pm line 1445.
utf8 "\xFB" does not map to Unicode at /Users/cpanxaoc/.plenv/versions/5.20.2/lib/perl5/site_perl/5.20.2/Path/Tiny.pm line 1445.
utf8 "\xC9" does not map to Unicode at /Users/cpanxaoc/.plenv/versions/5.20.2/lib/perl5/site_perl/5.20.2/Path/Tiny.pm line 1445.
utf8 "\xE6" does not map to Unicode at /Users/cpanxaoc/.plenv/versions/5.20.2/lib/perl5/site_perl/5.20.2/Path/Tiny.pm line 1445.
utf8 "\xBE" does not map to Unicode at /Users/cpanxaoc/.plenv/versions/5.20.2/lib/perl5/site_perl/5.20.2/Path/Tiny.pm line 1445.
utf8 "\xAD" does not map to Unicode at /Users/cpanxaoc/.plenv/versions/5.20.2/lib/perl5/site_perl/5.20.2/Path/Tiny.pm lin
@cpanxaoc
cpanxaoc / gist:616dcc9a2348fddf646d
Created June 2, 2015 21:00
Methods/Functions from Rex (Rex DSL) for VIM
" Methods/Functions from Rex (Rex DSL)
" Borrowed from https://gist.github.com/ferki/d83ebd67ce828ef9d00f
syn keyword perlStatementScalar cache cat desc ensure extract groups_file
\ LOCAL needs password path private_key
\ public_key rm sayformat sudo sudo_password
\ unlink update_package_db update_system user
syn keyword perlStatementList account append_if_no_such_line
\ append_or_amend_line batch chgrp chmod
\ chown clearpart cmdb cp create_user
\ cron_entry file get ln pkg run run_task
@cpanxaoc
cpanxaoc / gist:f1cee7b5a8010515974f
Created May 28, 2015 23:25
Updated taglist.vim that has Rex DSL function names, so they show up when using taglist in VIM
diff --git a/plugin/taglist.vim b/plugin/taglist.vim
index 59901f6..74303d0 100644
--- a/plugin/taglist.vim
+++ b/plugin/taglist.vim
@@ -432,7 +432,8 @@ let s:tlist_def_make_settings = 'make;m:macro'
let s:tlist_def_pascal_settings = 'pascal;f:function;p:procedure'
" perl language
-let s:tlist_def_perl_settings = 'perl;c:constant;l:label;p:package;s:subroutine'
+let s:tlist_def_perl_settings = 'perl;b:batch;t:task;'
@cpanxaoc
cpanxaoc / gist:32599c599ac1ac3fbace
Created May 28, 2015 22:39
Output of 'ctags --list-kinds=perl
[ёжик][bdmanning ~]$ ctags --list-kinds=perl
ctags: Warning: Language "perl" already defined
c constants
f formats
l labels
p packages
s subroutines
d subroutine declarations [off]
t task
t task
@cpanxaoc
cpanxaoc / gist:3bb97b202794668cb547
Created May 27, 2015 23:25
Rex task/batch regex for ctags
my $regex = qr/
^task[ \t]* "([a-zA-Z0-9_]+)"\s{0,},
|^task[ \t]*q{1,2}\(([a-zA-Z0-9_-]+)\)\s{0,},
|^batch[ \t]*"([a-zA-Z0-9_-]+)"\s{0,},
|^batch[ \t]*q{1,2}\(([a-zA-Z0-9_-]+)\)\s{0,},
/x;
@cpanxaoc
cpanxaoc / gist:24d94a0bb1df2e525555
Created May 22, 2015 01:15
Output of convert_item_to_head2.pl
==== Checking module Rex.pm ====
9 header: =head1 NAME
13 header: =head1 DESCRIPTION
19 header: =head1 GETTING HELP
21 over(1): =over 4
23 item: =item * Web Site: L<http://rexify.org/>
25 item: =item * IRC: irc.freenode.net #rex
27 item: =item * Bug Tracker: L<https://github.com/RexOps/Rex/issues>
29 item: =item * Twitter: L<http://twitter.com/jfried83>
31 back: =back
@cpanxaoc
cpanxaoc / gist:4063ba92d5a97f3b8560
Created May 20, 2015 23:33
gcc -v for Debian Wheezy
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian 4.7.2-5' --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --with-arch-32=i586 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Debian 4.7.2-5)