Skip to content

Instantly share code, notes, and snippets.

@calvinf
calvinf / find_perl_modules.sh
Created November 24, 2010 22:31
Find All Perl Modules
perl -MFile::Find=find -MFile::Spec::Functions -Tlwe \
'find { wanted => sub { print canonpath $_ if /\.pm\z/ }, no_chdir => 1 }, @INC'
@calvinf
calvinf / jquery.myplugin.js
Created July 8, 2010 21:08
jQuery Plugin Stub
;(function($) {
$.fn.myPlugin = function(options) {
var defaults = {
};
var options = $.extend(defaults, options);
function log(message) { /* debug function */
if (console && console.log) {
@calvinf
calvinf / .alacritty.yml
Last active September 4, 2024 06:01
calvinf's .bash_profile
# Configuration for Alacritty, the GPU enhanced terminal emulator.
# https://github.com/alacritty/alacritty
import:
# https://github.com/dracula/alacritty
- ./.dracula.yml
window:
# Values for `decorations` (macOS only):
# - transparent: Title bar, transparent background and title bar buttons
@calvinf
calvinf / wordpress_get_plugins.pl
Created February 1, 2010 23:10
Get WordPress plugins from SVN
#!/usr/bin/perl
use strict;
use constant PLUGIN_DIR => 'http://svn.wp-plugins.org/';
#argument 1 should be file name with 1 plugin slug per line
while(<>) {
chomp;
checkout($_);
}
@calvinf
calvinf / image_swap.js
Created May 7, 2009 20:40
javascript image swapper, for use with rollover image replacements
function swapimage(elem_id, img_src) {
document.getElementById(elem_id).src = img_src;
}