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 | |
use warnings; | |
use strict; | |
use 5.010; | |
my @CMPMODS = ( 'CPAN::Version' => 'CPN' => sub { | |
return CPAN::Version->vcmp( @_ ); | |
}, | |
'version' => 'VRM' => sub { |
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 | |
# STDIN - list of newline separated file names | |
print_dup_files() { | |
# First find files with exact same file sizes | |
xargs stat -c '%s %n' | sort -k 1 | | |
# Swap fields because uniq can only skip fields. | |
# (uniq -D prints all duplicates) | |
awk '{ print $2, $1 }' | uniq -f 1 -D | | |
# Cut out the file size, we are done with it. |
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
diff --git a/clydelib/sync.lua b/clydelib/sync.lua | |
index 6c23d7c..97adf1f 100644 | |
--- a/clydelib/sync.lua | |
+++ b/clydelib/sync.lua | |
@@ -1060,31 +1060,27 @@ local function aur_install(targets) | |
getalldeps(targets, needs, needsdeps, caninstall, provided) | |
for i, pkg in ipairs(aurpkgs) do | |
- if (tblisin(caninstall, pkg) and not tblisin(installedtbl, pkg)) then | |
- if (tblisin(targets, pkg) and not tflags["alldeps"]) |
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 | |
use warnings; | |
use strict; | |
my $adjustme = do { local $/; <DATA> }; # slurp! | |
$adjustme =~ s{ | |
(?&AdBlock) |
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 | |
pacman -Qim | perl -lnaF/\\s+:\\s+/ -e 'chomp; | |
$PKG = ( $F[1] =~ /^perl-/ ? $F[1] : undef ) if $F[0] eq q{Name}; | |
print $PKG if $PKG && $F[0] =~ /^Arch/ && $F[1] ne q{any}; | |
' | |
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 warnings; | |
use strict; | |
my $WORDCOUNT = 5; | |
my $LANGCOUNT = 50; | |
my @FEATS = ('a'..'d'); | |
# create a random comma separated string of features |
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
#include <string.h> | |
#include <stdio.h> | |
#include <wchar.h> | |
#include <locale.h> | |
#include <time.h> | |
#define DEFAULT_WIDTH 20 | |
#define BUFFER_SIZE 128 | |
int |
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
words := list("foo", "bar") | |
Foo := Object clone do( | |
words foreach(w setSlot(w, method(w println))) | |
) | |
obj := Foo clone | |
obj foo | |
obj bar |
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 require Tk | |
proc initTop {} { | |
menu .topMenu | |
menu .topMenu.fileMenu -tearoff 0 | |
.topMenu.fileMenu add command -label Open... -command selectVCEPath | |
.topMenu add cascade -label File -menu .topMenu.fileMenu | |
. configure -menu .topMenu |
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
#lang racket | |
;; Generate a provides list for the ArchLinux perl package. Scan the appropriate directories | |
;; under the perl source tree for directories containing distributions, suitable for CPAN. | |
;; Search the files in the distributions for VERSION strings, which are perl expressions. | |
;; Filters these version strings through the perl interpreter, then transform the dist. | |
;; names and versions into package names and versions. This last step is much easier now. | |
;; The perl source tree has been greatly organized since even 5.18. | |
(define perl-src-dir "/Users/juster/src/perl-5.20.0") |