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
struct WorldGrid { | |
static const size_t vertexDataStride = 6; | |
wgpu::Buffer _indexBuffer; | |
wgpu::BindGroup _bindGroup; | |
wgpu::DepthStencilState _depthStencil; | |
wgpu::RenderPipeline _pipeline; | |
WorldGrid() { | |
_depthStencil.format = wgpu::TextureFormat::Depth24PlusStencil8; |
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
// Note that this is not the production code | |
pragma solidity 0.5.6; | |
import "./IERC20.sol"; | |
contract Wallet { | |
address internal token = 0x123...<hot_wallet_addr>; | |
address internal hotWallet = 0x321...<hot_wallet_addr>; | |
constructor() public { |
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
[Unit] | |
Description=JACK | |
After=sound.target | |
[Service] | |
LimitRTPRIO=infinity | |
LimitMEMLOCK=infinity | |
User=rotter | |
ExecStart=/usr/bin/jackd --realtime -P89 -d alsa -d hw:1 -r 48000 | |
Environment=DBUS_SESSION_BUS_ADDRESS=unix:path=/run/dbus/system_bus_socket |
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 | |
function install_dependencies() { | |
echo "Installing dependencies..." | |
sudo apt -qq update | |
sudo apt -qq install -y curl git wget | |
# sudo apt -qq install -y bison flex kernel-package libelf-dev libssl-dev | |
sudo apt -qq install -y bison flex libelf-dev libssl-dev | |
} |
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/sh | |
# install needed curl package | |
sudo apt install --no-install-recommends curl -y | |
# install kubectl | |
# https://github.com/kubernetes/minikube/issues/3437#issuecomment-449408316, maybe use https://storage.googleapis.com/minikube/releases/v0.30.0/docker-machine-driver-kvm2 | |
curl -Lo /tmp/kubectl https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && \ | |
chmod +x /tmp/kubectl && \ | |
sudo mv /tmp/kubectl /usr/local/bin/kubectl | |
# kubectl tab completion | |
sudo sh -c 'echo "source <(kubectl completion bash)" > /etc/bash_completion.d/kubectl' |
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
package pb | |
import ( | |
"fmt" | |
"reflect" | |
st "github.com/golang/protobuf/ptypes/struct" | |
) | |
// ToStruct converts a map[string]interface{} to a ptypes.Struct |
References:
- Create a new Droplet on DigitalOcean
- Name the Droplet after your Domain (yourdomain.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
/* | |
* OpenSimplex (Simplectic) Noise in C++ | |
* by Arthur Tombs | |
* | |
* Modified 2015-01-08 | |
* | |
* This is a derivative work based on OpenSimplex by Kurt Spencer: | |
* https://gist.github.com/KdotJPG/b1270127455a94ac5d19 | |
* | |
* Anyone is free to make use of this software in whatever way they want. |
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
#include "hemicube.h" | |
#define PACK_HEMICUBES 1 | |
static void get_hemicube_face_normal(int index, Vector3 *forward, Vector3 *left, Vector3 *up) { | |
// Unwrapped hemicube with positive-Z in the middle. | |
switch (index) { | |
case 0: *forward = Vector3(+1, 0, 0); *left = Vector3( 0, 1, 0); break; |
NewerOlder