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
lscpu | |
shell: /bin/bash -e {0} | |
Architecture: x86_64 | |
CPU op-mode(s): 32-bit, 64-bit | |
Byte Order: Little Endian | |
CPU(s): 2 | |
On-line CPU(s) list: 0,1 | |
Thread(s) per core: 1 | |
Core(s) per socket: 2 | |
Socket(s): 1 |
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
REPO=rammus/action-demo | |
FILE=README.md | |
INPUT_GITHUB_TOKEN= | |
# https://docs.github.com/en/free-pro-team@latest/rest/reference/repos#get-repository-content | |
curl \ | |
-H "Accept: application/vnd.github.v3+json" \ | |
-H "Authorization: token $INPUT_GITHUB_TOKEN" \ | |
"https://api.github.com/repos/${REPO}/contents/${FILE}" |
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
docker buildx version | |
mkdir -p ~/.docker/cli-plugins | |
BUILDX_VERSION="v0.4.2" | |
wget https://github.com/docker/buildx/releases/download/${BUILDX_VERSION}/buildx-${BUILDX_VERSION}.darwin-amd64 -O ~/.docker/cli-plugins/docker-buildx | |
chmod a+x ~/.docker/cli-plugins/docker-buildx | |
docker buildx version |
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
from flask import Flask | |
app = Flask(__name__) | |
@app.route('/') | |
def hello_world(): | |
return 'Hello, Rammus Xu!' |
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
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: telepresence-rammus | |
spec: | |
selector: | |
owner: rammus | |
type: LoadBalancer | |
ports: | |
- name: http |
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
version: "2" | |
services: | |
overworld: | |
image: dstacademy/dontstarvetogether | |
container_name: overworld | |
hostname: overworld | |
tty: true | |
stdin_open: true | |
command: dst-server start --update=all | |
env_file: ./overworld.env |
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 mo = require('./module')(); | |
console.log(mo); | |
var who = mo.A; | |
console.log(who); | |
who.name ='wal2er'; | |
console.log(who); | |
console.log(mo); |
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 request = [ | |
profileUtil.createUser('[email protected]', 'qwer1234', 'test', 'Company'), | |
profileUtil.createUser('[email protected]', 'qwer1234', 'test2', 'Company'), | |
]; | |
request[0].then(function(value) { | |
return request[1]; | |
}) | |
.then(function(value) { | |
return request[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
import xml.etree.ElementTree as ET | |
tree = ET.parse("arrays.xml") | |
ET.dump(tree) | |
tree.write("new_strins.xml") |
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
class BrowseController < ApplicationController | |
def index | |
path = "public/apk_pool/"+ params[:folder] +"/*" | |
@apks = Dir.glob(path) | |
@apks.each do |apk| | |
puts apk | |
end | |
end | |
def show |
NewerOlder