file | line | func |
---|---|---|
./src/archive/tar/reader.go | 296 | func parsePAX(r io.Reader) (map[string]string, error) { |
./src/archive/tar/reader.go | 39 | func NewReader(r io.Reader) *Reader { |
./src/archive/tar/reader.go | 517 | func readGNUSparseMap1x0(r io.Reader) (sparseDatas, error) { |
./src/archive/tar/reader.go | 808 | func mustReadFull(r io.Reader, b []byte) (int, error) { |
./src/archive/tar/reader.go | 818 | func tryReadFull(r io.Reader, b []byte) (n int, err error) { |
./src/archive/tar/reader.go | 831 | func discard(r io.Reader, n int64) error { |
./src/archive/tar/writer.go | 452 | func (tw *Writer) readFrom(r io.Reader) (int64, error) { |
./src/archive/tar/writer.go | 510 | func (fw *regFileWriter) ReadFrom(r io.Reader) (int64, error) { |
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 ( | |
"bytes" | |
"fmt" | |
"io/ioutil" | |
"log" | |
"os" | |
"golang.org/x/text/encoding/japanese" |
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
var minNum = 1 // The minimum bingo number | |
var maxNum = 15 // The maximum bingo number | |
var numRows = 3 // The number of bingo sheet rows | |
var numCols = 3 // The number of bingo sheet columns | |
// The list of left top point of a bingo sheet in format of spreadsheet rows and columns number | |
var startingPoints = [ | |
{"row":4,"col":2}, | |
{"row":4,"col":6}, | |
{"row":11,"col":2}, |
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
namespace :convert_to_active_storage do | |
desc 'Convert to Activestorage' | |
task :run => :environment do | |
conn = ActiveRecord::Base.connection.raw_connection | |
Cafe.order(:id).each do |cafe| | |
puts "Convert cafe id=#{cafe.id}" | |
blob_params = [ | |
cafe.class.generate_unique_secure_token, |
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
require 'fluent/plugin/parser' | |
require 'heroku-log-parser' | |
module Fluent | |
module Plugin | |
class HerokuParser < Parser | |
Fluent::Plugin.register_parser('heroku', self) | |
def configure(conf) | |
super |
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
<h1>Editing {{.Title}}</h1> | |
<form action="/save/{{.Title}}" method="POST"> | |
<div><textarea name="body" rows="20" cols="80">{{printf "%s" .Body}}</textarea></div> | |
<div><input type="submit" value="Save"></div> | |
</form> |
rootじゃないユーザーで実行したい。
mysql> select * from User where User = 'test-user' \G
*************************** 1. row ***************************
Host: localhost
User: test-user
Password:
Select_priv: Y
Insert_priv: Y
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 ( | |
"log" | |
"net" | |
) | |
func main() { | |
ln, err := net.Listen("tcp", ":8081") | |
if err != nil { |
NewerOlder