Skip to content

Instantly share code, notes, and snippets.

View kofj's full-sized avatar
💭
I may be slow to respond.

疯魔慕薇 kofj

💭
I may be slow to respond.
View GitHub Profile
@kofj
kofj / README.md
Created December 20, 2019 15:06
Docker Registry P2P bridge demo

FileServer

go run fileserver/main.go /YOUR/Storage/path

Registry

go run github.com/kofj/distribution/cmd/registry/main.go config-dev.yml
@kofj
kofj / executions.5.tasks.32.log
Created July 28, 2019 13:22
harbor replicate failed log.
2019-07-28T12:42:35Z [INFO] [/replication/transfer/image/transfer.go:95]: client for source registry [type: docker-hub, URL: https://hub.docker.com, insecure: false] created
2019-07-28T12:42:35Z [INFO] [/replication/transfer/image/transfer.go:105]: client for destination registry [type: harbor, URL: http://core:8080, insecure: true] created
2019-07-28T12:42:35Z [INFO] [/replication/transfer/image/transfer.go:138]: copying goharbor/harbor-log:[v1.8.2-dev,v1.8.1-dev,v1.8.1,v1.8.0](source registry) to goharbor/harbor-log:[v1.8.2-dev,v1.8.1-dev,v1.8.1,v1.8.0](destination registry)...
2019-07-28T12:42:35Z [INFO] [/replication/transfer/image/transfer.go:157]: copying goharbor/harbor-log:v1.8.2-dev(source registry) to goharbor/harbor-log:v1.8.2-dev(destination registry)...
2019-07-28T12:42:35Z [INFO] [/replication/transfer/image/transfer.go:261]: pulling the manifest of image goharbor/harbor-log:v1.8.2-dev ...
2019-07-28T12:42:39Z [INFO] [/replication/transfer/image/transfer.go:272]: the manifest of image goharbor/h
API server listening at: [::]:2345
2019-04-09T09:26:33Z info layer=debugger launching process with args: [/go/debug -c /etc/jobservice/config.yml]
2019-04-09T09:27:20Z debug layer=debugger continuing
2019-04-09T09:27:20Z [INFO] the factory for adapter harbor registered
2019-04-09T09:27:20Z [INFO] the factory for adapter native registered
2019-04-09T09:27:20Z [INFO] get configuration from url: http://core:8080/api/internal/configurations
2019-04-09T09:27:20Z [INFO] 0 outdated log entries are sweepped by sweeper *sweeper.FileSweeper
2019-04-09T09:27:20Z [INFO] Registering database: type-PostgreSQL host-postgresql port-5432 databse-registry sslmode-"disable"
2019-04-09T09:27:21Z [INFO] Register database completed
2019-04-09T09:27:21Z [INFO] Register job *impl.DemoJob with name DEMO
@kofj
kofj / SMBDIS.ASM
Created January 24, 2018 01:48 — forked from 1wErt3r/SMBDIS.ASM
A Comprehensive Super Mario Bros. Disassembly
;SMBDIS.ASM - A COMPREHENSIVE SUPER MARIO BROS. DISASSEMBLY
;by doppelganger (doppelheathen@gmail.com)
;This file is provided for your own use as-is. It will require the character rom data
;and an iNES file header to get it to work.
;There are so many people I have to thank for this, that taking all the credit for
;myself would be an unforgivable act of arrogance. Without their help this would
;probably not be possible. So I thank all the peeps in the nesdev scene whose insight into
;the 6502 and the NES helped me learn how it works (you guys know who you are, there's no
@kofj
kofj / gist:567e94a803d27b852cb64ab4311c0f5a
Created March 31, 2016 05:49 — forked from khakimov/gist:3558086
Matrix Effect in you terminal
echo -e "\e[1;40m" ; clear ; while :; do echo $LINES $COLUMNS $(( $RANDOM % $COLUMNS)) $(( $RANDOM % 72 )) ;sleep 0.05; done|awk '{ letters="abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789@#$%^&*()"; c=$4; letter=substr(letters,c,1);a[$3]=0;for (x in a) {o=a[x];a[x]=a[x]+1; printf "\033[%s;%sH\033[2;32m%s",o,x,letter; printf "\033[%s;%sH\033[1;37m%s\033[0;0H",a[x],x,letter;if (a[x] >= $1) { a[x]=0; } }}'
@kofj
kofj / socks5.go
Last active August 29, 2015 14:26 — forked from maliubiao/socks5.go
Socks5RoundTripper for net/http
package socks5
import (
"net"
"time"
"bytes"
"errors"
"bufio"
"strconv"
"strings"
for i in a b c d e f g h i j k l
do
sudo parted -s /dev/sd${i} mklabel gpt
sudo parted -s /dev/sd${i} mkpart sd${i} 0% 100%
sudo parted -s /dev/sd${i} print
sudo mkfs.xfs -f /dev/sd${i}1
UUID=$(blkid /dev/sd${i}1 -o value -s UUID)
FS=$(blkid /dev/sd${i}1 -o value -s TYPE)
sudo mkdir /mnt/sd${i}
Thread::try_create(): pthread_create failed with error 11common/Thread.cc: In function 'void Thread::create(size_t)' thread 7f463205f7c0 time 2015-04-25 02:21:54.883375
common/Thread.cc: 128: FAILED assert(ret == 0)
ceph version 0.80.7 (6c0127fcb58008793d3c8b62d925bc91963672a3)
1: (Thread::create(unsigned long)+0x8a) [0x7f4630f5ab9a]
2: (SafeTimer::init()+0x92) [0x7f4630f30792]
3: (librados::RadosClient::connect()+0xd3a) [0x7f4630e8caea]
4: (_cgo_4da98b952cf3_Cfunc_rados_connect()+0xc) [0x40229c]
5: bin/chm-server() [0x42e3e1]
NOTE: a copy of the executable, or `objdump -rdS <executable>` is needed to interpret this.
terminate called after throwing an instance of 'ceph::FailedAssertion'
@kofj
kofj / cross.go.sh
Created January 26, 2015 03:17
# This script will build cross lib of go On you Mac.
#!/bin/bash
# This script will build cross lib of go On you Mac.
cd /usr/local/go/src
sudo CGO_ENABLED=0 GOOS=linux GOARCH=amd64 ./make.bash
sudo CGO_ENABLED=0 GOOS=linux GOARCH=386 ./make.bash
sudo CGO_ENABLED=0 GOOS=windows GOARCH=amd64 ./make.bash
@kofj
kofj / FTTSR.cmd
Created December 26, 2014 08:06
Forbidden Tencent TAOFrame Service running
@echo off
set name="TAOFrame"
sc delete %name%
sc create %name%
exit