選択。BUFFERに登録されるが、PROMPTの文字が見えなくなる(PROMPT幅分の空白はある)
This file contains hidden or 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
class UserRegistrationsController < ApplicationController | |
def new | |
@user_registration_form = UserRegistrationForm.new | |
end | |
def create | |
@user_registration_form = UserRegistrationForm.new(user_registration_form_params) | |
if @user_registration_form.save | |
sign_in(@user_registration_form.user) |
This file contains hidden or 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
class FakeStorage implements Storage { | |
length: number; | |
[key: string]: any; | |
[index: number]: string; | |
constructor() { | |
this.length = 0; | |
} | |
getItem(key: string): any { |
This file contains hidden or 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
package Sample1; | |
use Exporter::Lite; | |
use constant HOGE => 'fuga'; | |
our @EXPORT_OK = qw(HOGE); | |
1; |
This file contains hidden or 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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use utf8; | |
use Web::Query; | |
use Time::HiRes qw(sleep); | |
use Perl6::Say; | |
use LWP::UserAgent; | |
use URI; |
This file contains hidden or 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 peco-git-recent-branches () { | |
local selected_branch=$(git for-each-ref --format='%(refname)' --sort=-committerdate refs/heads | \ | |
perl -pne 's{^refs/heads/}{}' | \ | |
peco) | |
if [ -n "$selected_branch" ]; then | |
BUFFER="git checkout ${selected_branch}" | |
zle accept-line | |
fi | |
zle clear-screen | |
} |
This file contains hidden or 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
・テスト |
This file contains hidden or 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
#!/usr/bin/env perl | |
use strict; | |
use warnings; | |
use Test::TCP; | |
use File::Temp; | |
use LWP::UserAgent; | |
use HTTP::Server::PSGI; | |
use Path::Class; | |
use Cwd; |
This file contains hidden or 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
package main | |
import ( | |
"code.google.com/p/go-tour/wc" | |
"strings" | |
) | |
func WordCount(s string) map[string]int { | |
result := make(map[string]int) |
This file contains hidden or 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
<?php | |
include 'HTTP/OAuth/Consumer.php'; | |
$consumer_key = 'xxxxxxxxxxx'; | |
$consumer_secret = 'xxxxxxxxxxxxxxxxxxxxxxxxxxx'; | |
/* consumerの設定 */ | |
$consumer = new HTTP_OAuth_Consumer($consumer_key, $consumer_secret); | |
$http_request = new HTTP_Request2(); | |
$http_request->setConfig('ssl_verify_peer', false); |
NewerOlder