aws ec2 describe-instances \
--query 'Reservations[].Instances[].[PrivateIpAddress,Placement.AvailabilityZone,InstanceType,State.Name,InstanceId,Platform,State.Code,VpcId]' \
--output table
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
version: '3.2' | |
services: | |
agent: | |
image: portainer/agent | |
environment: | |
# REQUIRED: Should be equal to the service name prefixed by "tasks." when | |
# deployed inside an overlay network | |
AGENT_CLUSTER_ADDR: tasks.agent | |
# AGENT_PORT: 9001 |
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
s = '/example/like_123/1_t34893_.that' | |
int(re.findall(r'1_t([\d]+)_', s)[0]) |
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
[ | |
{ | |
"Config": { | |
"Args": { | |
"Description": "", | |
"Name": "", | |
"Settable": null, | |
"Value": null | |
}, | |
"Description": "REX-Ray FUSE Driver for Amazon Simple Storage Service (S3FS)", |
- fb: https://developers.facebook.com/tools/debug/sharing/
- twitter: https://cards-dev.twitter.com/validator
- kakao: https://developers.kakao.com/docs/cache
- telegram: @WebpageBot
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
### remote | |
pse="\[\033[m\]" | |
ps_w="\[\033[33;1m\]\w$pse" | |
ps_t="\[\033[35m\]\t$pse" | |
ps_h="\[\033[32m\][\h]$pse" | |
ps_u="\[\033[36m\]\u$pse" | |
if [ "`whoami`" = "root" ]; then | |
ps_p="# $pse" | |
else |
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 sys | |
import os | |
import codecs | |
# euc-kr to utf-8 with BOM | |
def convert(path): | |
with codecs.open(path, 'r', 'euc-kr', errors='ignore') as f: | |
out_lines = [] | |
for line in f.readlines(): |
I hereby claim:
- I am zironycho on github.
- I am zironycho (https://keybase.io/zironycho) on keybase.
- I have a public key ASBFpr3Bu-np1bvVeBDC7-W7Nws-zTGpaaWWP5S-r88qMQo
To claim this, I am signing this object:
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"> | |
<plist version="1.0"> | |
<dict> | |
<key>Ansi 0 Color</key> | |
<dict> | |
<key>Alpha Component</key> | |
<real>1</real> | |
<key>Blue Component</key> | |
<real>0.19848701357841492</real> |
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
def truncate_euckr(str, limit): | |
buf = bytes() | |
for c in str: | |
tmp = c.encode('euc-kr') | |
if len(buf) + len(tmp) < limit: | |
buf += tmp | |
else: | |
break | |
return buf |