-
Mount TimeMachine volume from Finder.
-
Unlock Target Machine's Backup sparsebundle.
sudo chflags -R nouchg /Volumes/{TimeMachine Volume Name}/{Target Machine's Name}.sparsebundle
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# https://gist.github.com/ihsoy-s/5292735 を参考にしました | |
channel="$1" | |
# | |
# parameter setting | |
# | |
pid=$$ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
red=31 | |
green=32 | |
lightblue=36 | |
function cecho { | |
color=$1 | |
shift | |
echo -e "\033[${color}m$@\033[m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@echo off | |
for /f "usebackq tokens=*" %%i in (`cygpath '%CD%'`) do set RESULT=%%i | |
C: | |
chdir C:\cygwin64\bin | |
bash -l -c "cd '%RESULT%';bash -" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/ext/-test-/printf/printf.c b/ext/-test-/printf/printf.c | |
index d913fe5..1ebe804 100644 | |
--- a/ext/-test-/printf/printf.c | |
+++ b/ext/-test-/printf/printf.c | |
@@ -28,7 +28,7 @@ printf_test_q(VALUE self, VALUE obj) | |
} | |
static char * | |
-utoa(char *p, char *e, unsigned int x) | |
+my_utoa(char *p, char *e, unsigned int x) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use Benchmark qw/cmpthese/; | |
my @input = ("1", "0"); | |
cmpthese(0, { | |
'String' => sub { foreach (@data) { $_ eq "0" || $_ eq "1" } }, | |
'Number' => sub { foreach (@data) { $_ == 0 || $_ == 1 } }, | |
'Regex' => sub { foreach (@data) { $_ =~ /^[01]$/ } } | |
}); |
Installing ImageMagick (Image::Magick) on a custom Perl installed via plenv
https://darkpan.com/files/plenv-imagemagick.txtより転載
- plenv
git clone git://github.com/tokuhirom/plenv.git ~/.plenv
echo 'export PATH="$HOME/.plenv/bin:$PATH"' >> ~/.bash_profile
echo 'eval "$(plenv init -)"' >> ~/.bash_profile
source ~/.bash_profile
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function() { | |
function goodbyePromo() { | |
$('div.promoted-tweet').children('div.content').children('div.context').children('button.js-action-dismiss').click(); | |
}; | |
goodbyePromo(); | |
var mo = new MutationObserver(goodbyePromo); | |
mo.observe($('div.stream-container').get(0), {'attributes':true, 'childList': true, 'subtree': true}); | |
})(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module.exports = function preg_quote (str, delimiter) { // eslint-disable-line camelcase | |
// discuss at: http://locutus.io/php/preg_quote/ | |
// original by: booeyOH | |
// improved by: Ates Goral (http://magnetiq.com) | |
// improved by: Kevin van Zonneveld (http://kvz.io) | |
// improved by: Brett Zamir (http://brett-zamir.me) | |
// bugfixed by: Onno Marsman (https://twitter.com/onnomarsman) | |
// example 1: preg_quote("$40") | |
// returns 1: '\\$40' | |
// example 2: preg_quote("*RRRING* Hello?") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
" ファイルエンコーディング | |
set fileencodings=utf-8,cp932 | |
" 編集中のファイルが変更されたら自動で読み直す | |
set autoread | |
" 行番号を表示 | |
set number | |
" 現在の行を強調表示 |
OlderNewer