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
using System; | |
using System.IO; | |
using System.Linq; | |
public class Hello | |
{ | |
public static void Main() | |
{ | |
Console.WriteLine(Combine("/var/test", "123", "fsfsfs/sfwfw", "..", "wffw")); |
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
using UnityEngine; | |
using System.IO; | |
using System.Net.Sockets; | |
using System.Collections; | |
using System; | |
public class PlayPCMStreamOverTCP : MonoBehaviour | |
{ | |
public TcpClient Client { get; private set; } |
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
var bs58 = require('bs58') | |
var unencodedData = "003c176e659bea0f29a3e9bf7880c112b1b31b4dc826268187" | |
var out = bs58.encode(new Buffer(unencodedData, 'hex')) | |
console.log(out) // => 16UjcYNBG9GTK4uq2f7yYEbuifqCzoLMGS |
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
using System; | |
using System.Collections; | |
using System.Globalization; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
using UnityEngine; | |
using Random = UnityEngine.Random; | |
/// <summary> | |
/// Copy contents of StreamingAssets to Application.persistentDataPath |
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
Show hidden characters
{ | |
"compilerOptions": { | |
"module": "es2015", | |
"moduleResolution": "node", | |
"target": "es2015", | |
"noImplicitAny": false, | |
"removeComments": true, | |
"preserveConstEnums": true, | |
"sourceMap": true, | |
"baseUrl": ".", |
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
{ | |
"env": { | |
"es6": true, | |
"node": true, | |
"mocha": true | |
}, | |
"parserOptions": { | |
"ecmaVersion": 2018, | |
"sourceType": "module" | |
}, |
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
let path = require("path"); | |
let { ServiceBroker } = require("moleculer"); | |
let ApiGatewayService = require("../../index"); | |
// Create broker | |
let broker = new ServiceBroker({ | |
logger: console, | |
cacher: "memory", | |
metrics: true, | |
validation: true |
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
# install docker | |
apt-get update | |
apt-get install -y \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add - |
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
# init cluster | |
sudo swapoff -a | |
sudo kubeadm init --pod-network-cidr=10.244.0.0/16 --apiserver-advertise-address=HOST_IP | |
# apply kubectl config | |
sudo cp -f /etc/kubernetes/admin.conf $HOME/.kube/config | |
sudo chown $(id -u):$(id -g) $HOME/.kube/config | |
# untaint master | |
kubectl taint nodes --all node-role.kubernetes.io/master- |
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 | |
set -o errexit | |
set -o pipefail | |
set -u | |
set -x | |
NVIDIA_DRIVER_VERSION="${NVIDIA_DRIVER_VERSION:-384.125}" | |
NVIDIA_DRIVER_DOWNLOAD_URL_DEFAULT="https://us.download.nvidia.com/tesla/${NVIDIA_DRIVER_VERSION}/NVIDIA-Linux-x86_64-${NVIDIA_DRIVER_VERSION}.run" | |
NVIDIA_DRIVER_DOWNLOAD_URL="${NVIDIA_DRIVER_DOWNLOAD_URL:-$NVIDIA_DRIVER_DOWNLOAD_URL_DEFAULT}" |
OlderNewer