Skip to content

Instantly share code, notes, and snippets.

@d4rkie
d4rkie / mb.paste-a-date.user.js
Last active Feb 8, 2018
MusicBrainz: Paste-A-Date! (fixed for the new Relationship Editor)
View mb.paste-a-date.user.js
// ==UserScript==
// @name MusicBrainz: Paste-A-Date!
// @description This script adds a field after the existing date fields where you can paste a date and it will try to parse it.
// @version 2015-01-13
// @author nikki, d4rkie
//
// @grant none
// @include *://musicbrainz.org/*
// @include *://beta.musicbrainz.org/*
// @include *://test.musicbrainz.org/*
View D3CE-cdtext.plist
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<array>
<dict>
<key>Properties</key>
<dict>
<key>DRCDTextCFStringEncodingKey</key>
<integer>66049</integer>
<key>DRCDTextCharacterCodeKey</key>
@d4rkie
d4rkie / config.rb
Created Mar 21, 2014
compass config. emulates a 5th output style I'd call "optimize"
View config.rb
# Require any additional compass plugins here.
if Sass::VERSION =~ /3.1/
raise "you should upgrade to Sass version 3.2"
end
# Set this to the root of your project when deployed:
http_path = "/"
css_dir = "/css"
sass_dir = "/scss"
@d4rkie
d4rkie / unminify.rb
Last active Aug 29, 2015
simple method to "prettify" compressed CSS. useful with compass in config.rb
View unminify.rb
def unminify(filename)
raise "file not found #{filename}" unless File.exists? filename
text = []
File.open(filename, 'r:UTF-8') do |f|
f.each_line do |line|
line.strip!
code = line
.split("\t").join(" ")
.gsub(/\s*{\s*/i, " {\n ")
View ioc.md

Dependency Injections

依存性の注入

???

Dependency injection is a software design pattern that allows the removal of hard-coded dependencies and makes it possible to change them, whether at run-time or compile-time.

http://p.tl/2tgA <-- japanese wiki page