Skip to content

Instantly share code, notes, and snippets.

View rhzs's full-sized avatar
🏠
Working from home

Ryuici rhzs

🏠
Working from home
View GitHub Profile
@rhzs
rhzs / geo.js
Created November 17, 2016 20:09 — forked from mkhatib/geo.js
A Javascript utility function to generate number of random Geolocations around a center location and in a defined radius.
/**
* Generates number of random geolocation points given a center and a radius.
* @param {Object} center A JS object with lat and lng attributes.
* @param {number} radius Radius in meters.
* @param {number} count Number of points to generate.
* @return {array} Array of Objects with lat and lng attributes.
*/
function generateRandomPoints(center, radius, count) {
var points = [];
for (var i=0; i<count; i++) {
@rhzs
rhzs / 0_Firecracker_on_GCE.md
Created March 15, 2020 12:50 — forked from apstndb/0_Firecracker_on_GCE.md
Run Firecracker on GCE

https://cloud.google.com/compute/docs/instances/enable-nested-virtualization-vm-instances?hl=en を参考に Compute Engine で nested VM を構築。

gcloud config set compute/zone us-central1-b
gcloud compute disks create disk1 --image-project debian-cloud --image-family debian-9
gcloud compute images create nested-vm-image --source-disk disk1 --licenses "https://www.googleapis.com/compute/v1/projects/vm-options/global/licenses/enable-vmx"
gcloud compute instances create example-nested-vm --image nested-vm-image --min-cpu-platform="Intel Skylake"
@rhzs
rhzs / nginx.conf
Created May 19, 2020 13:14 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@rhzs
rhzs / laravel-k8s-configmap.yaml
Created August 12, 2020 01:56 — forked from mkhmylife/laravel-k8s-configmap.yaml
Laravel Kubernetes Deployment files
apiVersion: v1
kind: ConfigMap
metadata:
name: backend-config
data:
APP_DEBUG: "false"
APP_ENV: production
APP_KEY: changeme
APP_LOG_LEVEL: debug
APP_NAME: "Laravel K8s"
@rhzs
rhzs / rm_mysql.md
Created October 25, 2020 16:08 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@rhzs
rhzs / salsa20_example.go
Created September 11, 2022 07:59 — forked from bokwoon95/salsa20_example.go
golang x/crypto/salsa20 example
// https://play.golang.org/p/UPn9o_AMpmr
package main
import (
"fmt"
"golang.org/x/crypto/salsa20"
)
var key = [32]byte{}
@rhzs
rhzs / busted-output.txt
Created July 26, 2023 20:54 — forked from suprememoocow/busted-output.txt
Testing Redis Lua Scripts
●●
2 successes / 0 failures / 0 errors / 0 pending : 0.008108 seconds
@rhzs
rhzs / convey_tests.yaml
Created April 7, 2024 07:51 — forked from bparli/convey_tests.yaml
Cloudformation template for Convey Test/Benchmarks
AWSTemplateFormatVersion: '2010-09-09'
Description: Convey Test/Benchmark Environment
Parameters:
AmiId:
Type: String
Default: 'ami-03d5c68bab01f3496'