Skip to content

Instantly share code, notes, and snippets.

@jcasimir
jcasimir / .gitignore
Last active March 1, 2024 08:01
Running all MiniTest Tests with SimpleCov
test/coverage/
@ojima-h
ojima-h / pivot.rb
Created October 10, 2014 08:10
クロス集計スクリプト
#!/usr/bin/ruby
# coding: utf-8
# Usage:
# pivot [options] [file]
#
# クロス集計を行います。
# -r や -c にカンマ区切りで複数の数値を指定することで、複数のキーに対して展開できます。
# file が指定されないと、標準入力からデータを読み込みます。
#
@1syo
1syo / Gemfile
Last active February 25, 2019 08:17
druby + jruby-poi を利用してパスワードエクセルを突破する
source "https://rubygems.org"
gem "jruby-poi", github: "kameeoze/jruby-poi", require: "poi"
gem "pry"
gem "bundler", require: ['drb/drb', 'stringio']
@canuk
canuk / moment.fiscal_year.js
Created February 24, 2014 19:26
Moment.js Fiscal Year Calculations (FY starts in October)
if (moment().quarter() == 4) {
var current_fiscal_year_start = moment().month('October').startOf('month');
var current_fiscal_year_end = moment().add('year', 1).month('September').endOf('month');
var last_fiscal_year_start = moment().subtract('year', 1).month('October').startOf('month');
var last_fiscal_year_end = moment().month('September').endOf('month');
} else {
var current_fiscal_year_start = moment().subtract('year', 1).month('October').startOf('month');
var current_fiscal_year_end = moment().month('September').endOf('month');
var last_fiscal_year_start = moment().subtract('year', 2).month('October').startOf('month');
var last_fiscal_year_end = moment().subtract('year', 1).month('September').endOf('month');
@backpaper0
backpaper0 / gitbucket-windowsservice.md
Created February 19, 2014 13:40
GitBucketをWindowsサービス化する

GitBucketをWindowsサービス化する

winswを利用してサービス化する。 winswはJenkinsやGlassFishも使ってる。

GitBucketをダウンロードする

winswをダウンロードする

@sugamasao
sugamasao / Rakefile
Created November 8, 2013 04:38
rakeタスク名を取得する
# rake hoge
task :hoge do |task|
p task.name # => "hoge"
end
@seraphy
seraphy / RSASample.java
Created July 5, 2012 14:09
JAVAにおける、RSAによるキー交換とAES暗号化・複合化(CBC/IVあり)のサンプル
package rsasample;
import java.io.ByteArrayOutputStream;
import java.math.BigInteger;
import java.security.Key;
import java.security.KeyFactory;
import java.security.KeyPair;
import java.security.KeyPairGenerator;
import java.security.interfaces.RSAPrivateKey;
@mame
mame / 0001-sfx-support.patch
Created May 10, 2012 13:40
sfx support of ruby
From 552877c780545e8b25ededf8fa2f0042597b6bcb Mon Sep 17 00:00:00 2001
From: Yusuke Endoh <[email protected]>
Date: Thu, 10 May 2012 22:38:46 +0900
Subject: [PATCH] * sfx support.
---
cygwin/GNUmakefile.in | 11 ++++++---
io.c | 64 +++++++++++++++++++++++++++++++++++++++++++++++++
ruby.c | 16 +++++++++++++
win32/fix-size.rb | 20 ++++++++++++++++
@rondevera
rondevera / css-to-select-range-of-children.html
Last active February 8, 2023 11:29
CSS selector for a range of children
<!DOCTYPE html>
<html>
<head>
<style>
/* How to select a range of children
* (Here, 3rd-7th children, inclusive):
*/
ul li:nth-child(n+3):nth-child(-n+7) {
outline: 1px solid #0f0;
}