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
| package go_key_lock | |
| import "sync" | |
| // KeyLock type | |
| type KeyLock struct { | |
| locks *sync.Map | |
| mu *sync.Mutex | |
| } |
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 { Router } from "express"; | |
| export const router = Router(); | |
| router.use((request, response, next) => { | |
| const { path, method, body } = request; | |
| const parts = path.split("/").filter(Boolean); | |
| let objectId = ""; | |
| let actionName = ""; |
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
| #!/bin/bash | |
| find . -name "*.flac" -exec ffmpeg -i {} -ab 320k -map_metadata 0 -id3v2_version 3 {}.mp3 \; |
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
| # default | |
| sudo sed -i 's/archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list | |
| # china | |
| sudo sed -i 's/cn.archive.ubuntu.com/mirrors.ustc.edu.cn/g' /etc/apt/sources.list |
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
| #!/bin/bash | |
| # run with root | |
| # sudo bash ./create_users.sh | |
| count=10 | |
| usrprefix=user | |
| dftpass=123456 | |
| dftshell=/bin/bash |
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
| #!/bin/bash | |
| # run with root | |
| # sudo bash ./install_docker_ubuntu.sh | |
| apt-get update && apt-get install -y apt-transport-https curl | |
| curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | apt-key add - | |
| apt-get remove docker docker-engine docker.io containerd runc | |
| apt-get install -y apt-transport-https ca-certificates curlg-agentsoftware-properties-common | |
| curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - |
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
| { | |
| "xsappname":"mt-server-starter", | |
| "tenant-mode":"shared", | |
| "description":"", | |
| "scopes":[ | |
| { | |
| "name":"$XSAPPNAME.Callback", | |
| "description":"With this scope set, the callbacks for subscribe, unsubscribe and getDependencies can be called.", | |
| "grant-as-authority-to-apps":[ | |
| "$XSAPPNAME(application,sap-provisioning,tenant-onboarding)" |
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
| { | |
| "appId":"mt-server-starter!t16391", | |
| "appUrls":{ | |
| "onSubscription":"https://you-app-routes.cfapps.us10.hana.ondemand.com/callback/v1.0/tenants/{tenantId}" | |
| }, | |
| "displayName":"MT Stater SaaS", | |
| "description":"MT Stater SaaS", | |
| "category":"Service" | |
| } |
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
| function debounce(func, wait) { | |
| var timer; | |
| return function () { | |
| var context = this, args = arguments; | |
| clearTimeout(timer); | |
| timer = setTimeout(function () { | |
| timer = null; | |
| func.apply(context, args); | |
| }, wait); | |
| }; |
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
| // main.js | |
| const cluster = require('cluster') | |
| if (cluster.isMaster) { | |
| console.log("starting..."); | |
| for (var i = 0; i < 4; i++) { |