Skip to content

Instantly share code, notes, and snippets.

View get_google_image_url.py
#!/usr/bin/env python3
# -*- encoding: UTF-8 -*-
import chromedriver_autoinstaller
import time
import re
import demjson
from bs4 import BeautifulSoup
from selenium import webdriver
View python_prompt_toolkit_test.py
#!/usr/bin/env python3
# -*- encoding: UTF-8 -*-
from prompt_toolkit import prompt
from prompt_toolkit.completion import FuzzyWordCompleter
# 単語の候補
my_completer = FuzzyWordCompleter(
["apple", "goole", "japan", "hoge", "hello world", "good morning"]
)
View example_p11_getsinger_bk4.go
// Copyright (c) 2020 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
// `github.com/miekg/pkcs11/p11`を使って、Yubikey内からsshのCryptoSignerを取得するサンプルコード
package main
import (
"crypto/rsa"
View example_p11_getsinger_bk4.go
// Copyright (c) 2020 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
// `github.com/miekg/pkcs11/p11`を使って、Yubikey内からsshのCryptoSignerを取得するサンプルコード
package main
import (
"crypto/rsa"
View example_p11_privprint.go
// Copyright (c) 2020 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
// `github.com/miekg/pkcs11/p11`を使って、Yubikey内からsshのCryptoSignerを取得するサンプルコード
package main
import (
"crypto/rsa"
View example_p11_getsinger.go
// Copyright (c) 2020 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
// `github.com/miekg/pkcs11/p11`を使って、Yubikey内からsshのCryptoSignerを取得するサンプルコード
package main
import (
"crypto"
View example_p11_pubprint.go
// Copyright (c) 2020 Blacknon. All rights reserved.
// Use of this source code is governed by an MIT license
// that can be found in the LICENSE file.
// `github.com/miekg/pkcs11/p11`を使って、Yubikey内のpublic keyをssh-rsa形式で出力するsampleコード
package main
import (
"crypto/rsa"
"crypto/x509"
@blacknon
blacknon / ssh_term_x11forwarding.go
Last active Jul 11, 2019
ssh_term_x11forwarding.go
View ssh_term_x11forwarding.go
// Test only on Mac
package main
import (
"crypto/sha1"
"errors"
"fmt"
"io"
"math/rand"
@blacknon
blacknon / notworking_ssh_term_x11forwarding.go
Created Jul 9, 2019
notworking_ssh_term_x11forwarding.go
View notworking_ssh_term_x11forwarding.go
package main
import (
"errors"
"fmt"
"os"
"os/signal"
"syscall"
"golang.org/x/crypto/ssh"
@blacknon
blacknon / ssh_term_ssh_config_proxy_command.go
Created Jun 9, 2019
ssh_term_ssh_config_proxy_command.go
View ssh_term_ssh_config_proxy_command.go
package main
import (
"fmt"
"io"
"io/ioutil"
"net"
"os"
"os/exec"
"os/signal"