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
# Thanks to http://ubuntuforums.org/showthread.php?t=1411273 for inspiration.. | |
# But what a disgusting nasty hack! This prevents partman from running (and | |
# mounts /target, creates /target/etc/fstab). d-i just can't cope with | |
# installation to partitionless block device... which is disappointing, | |
# because partitions are pointless for pvlinux guests. | |
# | |
# The hack works by ... wait for it... spawning a little while/sleep 1 script, | |
# waits for the partman-base.postinst file to appear (the preseed/earl_command | |
# hook is too early, and the partman/early_command is too late). Once it | |
# appears we replace this with a bit more script which does what we wanted |
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/sh | |
# It's a little insane this installer cannot be run headless, perhaps for license | |
# agreement reasons. This will fetch, verify and extract the binary into | |
# /opt/veracrypt/bin. Perhaps one day I'll help make cryptsetup understand | |
# veracrypt instead | |
set -e | |
VERATARURL='http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=veracrypt&DownloadId=1372347&FileTime=130649793702230000&Build=20959' | |
VERASIGURL='http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=veracrypt&DownloadId=1372354&FileTime=130649793743570000&Build=20959' | |
VERASIGID=54DDD393 | |
VERABIN=veracrypt-1.0f-1-setup-console-x64 |
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
CONCURRENCY_LEVEL=3 make-kpkg --rootcmd fakeroot --append-to-version=.3 --initrd kernel_image kernel_headers modules_image |
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
# Original header: | |
# Name Country State or province Secondary subdivision Locality Latitude Longitude Elevation meters Coll. start date Coll. end date Collector UID USI Number of specimens Sex Type status DeterminationVB DetBy DetDate Host Family Host name Host authority Host det HerbID Depository Host photo Locality photo _end | |
# Becomes: | |
# scientificName country stateProvince county verbatimLocality decimalLatitude decimalLongitude minimumElevationInMeters Coll. start date eventDate recordedBy catalogNumber recordNumber individualCount lifeStage sex typeStatus DeterminationVB identifiedBy dateIdentified Host Family Host name Host authority Host det HerbID Depository Host photo Locality photo _end associatedTaxa eventDate associatedMedia | |
# Break up the life stage/sex column | |
# %s/^\(\(\([^\t]*\)\t\)\{14\}\)\([^\ ]*\) \([^\t]*\)/\1\4\t\5/g |
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 | |
package main; | |
use strict; | |
use warnings; | |
use Perl::Tidy(); | |
my $secret = '# __PERLTIDY_IGNORING ###'; | |
my $secret_sub = '# __PERLTIDY_KEYWORD: '; | |
sub perltidy { |
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
use webs | |
db.map.find({_id : /^ParentWeb/i}).forEach(function (thing) { db = db.getMongo().getDB(thing.hash); db.dropDatabase(); }); |
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 -wT | |
# See bottom of file for default license and copyright information | |
package CSVDemo; | |
use strict; | |
use warnings; | |
# Adjust these variables to suit your own data/requirements | |
my $formname = 'System.MigrationScriptsCSVDemo.CSVDemoForm'; | |
my ( $csvtopic, $csvfile ) = |
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 -CSAD | |
# You probably want to run as perl -CSAD /tmp/test.pl | |
# This is a little exploration of http://perldoc.perl.org/perlunicode.html#The-"Unicode-Bug" | |
# See also http://stackoverflow.com/questions/6162484/why-does-modern-perl-avoid-utf-8-by-default | |
use utf8; | |
use warnings; | |
use strict; | |
my $u = 'ü'; |
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
package UTF8Tests; | |
use strict; | |
use warnings; | |
# TODO: Exercise | |
# $Foswiki::cfg{Site}{CharSet} | |
# $Foswiki::cfg{UseLocale} | |
# $Foswiki::cfg{Site}{Locale} | |
# $Foswiki::cfg{Site}{Lang} | |
# $Foswiki::cfg{Site}{FullLang} |
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
# See bottom of attachment for default license and copyright information | |
package Foswiki::Contrib::MigrationScriptsContrib::Roles::FoswikiAddressable; | |
use Moose::Role; | |
use Assert; | |
use Foswiki::Func(); | |
use Foswiki::Meta(); | |
use Foswiki::Address(); |
NewerOlder