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
from PIL import Image | |
from PIL.ExifTags import TAGS | |
# read the image data using PIL | |
# A image that should be read. | |
# 300*200 | |
image = Image.open("sample.png") | |
exifdata = image.getexif() | |
# Move iterator. | |
# Virtual memory won't impact this. | |
# 600 pixels. |
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
import base64 | |
import getpass | |
from cryptography.fernet import Fernet | |
BLOCK_SIZE = 32 | |
# the character used for padding--with a block cipher such as AES, the value | |
# you encrypt must be a multiple of BLOCK_SIZE in length. This character is | |
# used to ensure that your value is always a multiple of BLOCK_SIZE | |
PADDING = b'{' |
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
cd $GOPATH/src | |
mkdir -p github.com/vektra && cd github.com/vektra && git clone https://github.com/corentone/mockery.git | |
cd mockery && git checkout in-place-differentfolder && make install | |
# Test | |
cd $GOPATH/src | |
mkdir JyBP | |
git clone https://github.com/JyBP/keeptree.git && cd keeptree | |
mockery -all -keeptree -output ./cmd/mocks -dir ./ |
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 smoothscroll | |
let scrollstep = 100 | |
let blacklists = ["https://aidn.jp/*","https://patatap.com/*","https://typatone.com/*"] |
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 | |
# Parameters | |
socket="/run/foo.sock" | |
dump="/tmp/capture.pcap" | |
# Extract repetition | |
port=9876 | |
source_socket="$(dirname "${socket}")/$(basename "${socket}").orig" |
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
apiVersion: v1 | |
kind: ServiceAccount | |
metadata: | |
name: ingress | |
--- | |
apiVersion: rbac.authorization.k8s.io/v1beta1 | |
kind: ClusterRoleBinding | |
metadata: | |
name: ingress | |
subjects: |
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
{ | |
"MaterialColor":[ | |
{ "ColorName":"Red 50", "ColorValue": "#FFEBEE" }, | |
{ "ColorName":"Red 100", "ColorValue": "#FFCDD2" }, | |
{ "ColorName":"Red 200", "ColorValue": "#EF9A9A" }, | |
{ "ColorName":"Red 300", "ColorValue": "#E57373" }, | |
{ "ColorName":"Red 400", "ColorValue": "#EF5350" }, | |
{ "ColorName":"Red 500", "ColorValue": "#F44336" }, | |
{ "ColorName":"Red 600", "ColorValue": "#E53935" }, | |
{ "ColorName":"Red 700", "ColorValue": "#D32F2F" }, |
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
tell application "System Events" to tell process "NeteaseMusic" | |
tell menu bar 1 | |
tell menu bar item "Controls" | |
tell menu 1 | |
if menu item "Play" exists then | |
click menu item "Play" | |
display notification "Play Music" with title "NeteaseMusic" | |
else | |
click menu item "Pause" | |
display notification "Pause Music" with title "NeteaseMusic" |