mogrify -resize 50% copy.png
mogrify -resize 256x256 *.jpg
mogrify -transparent white image.png
| #!/bin/sh | |
| ## fork from http://qiita.com/uasi/items/a340bb487ec07caac799 | |
| if [ -z "`git config --local user.name`" ]; then | |
| echo "fatal: user.name is not set locally" | |
| exit 1 | |
| fi | |
| if [ -z "`git config --local user.email`" ]; then | |
| echo "fatal: user.email is not set locally" | |
| exit 1 |
| // ==UserScript== | |
| // @name WP Remove Accesskeys | |
| // @namespace senta.me | |
| // @description WordPressのアクセスキーを削除する。 | |
| // @include http://*/wp-admin/post.php* | |
| // @include http://*/wp-admin/post-new.php* | |
| // ==/UserScript== | |
| (function(){ | |
| window.addEventListener("load",function(){ | |
| var els = document.getElementsByTagName("input"); |
| @mixin step-frames($steps, $fromX, $fromY, $toX, $toY){ | |
| $i: 0; | |
| $frame: 0; | |
| @while $frame < 100 { | |
| @if $frame > 0{ | |
| #{$frame - 0.00001}% { | |
| background-position: #{($toX - $fromX) / $steps * ($i - 1)}px #{($toY - $fromY) / $steps * ($i - 1)}px; | |
| } | |
| } |
mogrify -resize 50% copy.png
mogrify -resize 256x256 *.jpg
mogrify -transparent white image.png
| mysql -u root the_db -e 'desc the_table'|awk '{if (match($2, "int")){type = "int"}else{type = "string"}}{print "* @property", type, $1}' |
| desc "List categories from existing posts (#{source_dir}/#{posts_dir}/*#{new_post_ext})" | |
| task :categories do | |
| categories = [] | |
| tags = [] | |
| Dir.glob("./#{source_dir}/#{posts_dir}/*.markdown") do |path| | |
| content = File.read(path) | |
| next unless content =~ /\A(---\s*\n.*?\n?)^(---\s*$\n?)/m | |
| data = YAML.load($1) | |
| categories.push data["categories"] if data["categories"] |
| cd ~/Dev | |
| mkdir project/{apps,scripts,docs} && touch $(dirname $_)/note.org |
| #!/bin/sh | |
| brew deps --installed | \ | |
| awk -F'[: ]+' \ | |
| '{ | |
| packages[$1]++ | |
| for (i = 2; i <= NF; i++) | |
| dependencies[$i]++ | |
| } | |
| END { |
| #!/bin/bash | |
| # Git subcommand to export diff | |
| # | |
| # `git export-diff <base> <target>` | |
| # ...or | |
| # `git export-diff <target>` base=HEAD | |
| BASE=$1 | |
| TARGET=$2 |
| #!/bin/bash | |
| # Git subcommand to export diff | |
| # | |
| # `git export-diff <base> <target>` | |
| # ...or | |
| # `git export-diff <target>` base=HEAD | |
| BASE=$1 | |
| TARGET=$2 |