Skip to content

Instantly share code, notes, and snippets.

@Craftworks
Craftworks / jquery.preloadpager.js
Created January 31, 2013 15:37
jQuery プリロードページャープラグイン(事前読み込み & スクロール監視)
(function($) {
$.preloadPager = function(options) {
var settings = $.extend({
autoLoad: true,
cache: false,
content: '.content',
pager: '#pager',
margin: $(window).height()
}, options);
@Craftworks
Craftworks / geotool.js
Created May 29, 2012 07:15
測地系変換ライブラリ(WGS <=> TKY, degree <=> dms)
//------------------------------------------------------------------------------
// geotool.js - version 1.0.0
//
// Copyright (c) 2005 Craftworks Corp. All Right Reserved.
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
// License as published by the Free Software Foundation; either
// version 2.1 of the License, or (at your option) any later version.
//
@Craftworks
Craftworks / mymemcheck
Created December 8, 2010 15:14
MySQL memory configuration check tool
#!/usr/bin/env perl
use strict;
use warnings;
my @GLOBAL_BUFFERS = qw(
key_buffer_size
innodb_buffer_pool_size
innodb_log_buffer_size
innodb_additional_mem_pool_size
use strict;
use warnings;
use Benchmark ':all';
use Data::Dumper;
use Data::Dump;
use Data::MessagePack;
use JSON::XS;
my $data = [
'foo',
#!/usr/bin/env perl
use strict;
use warnings;
use File::Temp 'tempfile';
require 5.008;
my $hosts = '/etc/hosts';
@Craftworks
Craftworks / canvas_loading_icon.html
Created April 27, 2010 10:09
canvas loading icon
<!DOCTYPE html>
<html>
<body>
<script type="text/javascript">
var LoadingIcon = function() { this.initialize.apply(this, arguments) };
LoadingIcon.prototype = {
initialize: function(rgb) {
var element = document.createElement('canvas'),
ctx = element.getContext('2d');