Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View karuna's full-sized avatar
🦡
Badger Badger Badger

Karuna Murti karuna

🦡
Badger Badger Badger
View GitHub Profile
@karuna
karuna / 2019-https-localhost.md
Created April 20, 2024 12:38 — forked from cecilemuller/2019-https-localhost.md
How to create an HTTPS certificate for localhost domains

How to create an HTTPS certificate for localhost domains

This focuses on generating the certificates for loading local virtual hosts hosted on your computer, for development only.

Do not use self-signed certificates in production ! For online certificates, use Let's Encrypt instead (tutorial).

@karuna
karuna / parser.go
Created September 25, 2022 14:34
debugging parser.go
package main
import (
"fmt"
"io"
"strings"
"time"
)
const (
@karuna
karuna / monitoring
Created May 14, 2022 04:29
prometheus+grafana+cadvisor
version: '3.8'
services:
prometheus:
image: prom/prometheus:latest
container_name: prometheus
restart: always
ports:
image: 'rust:latest'
stages:
- test
- doc
- build
variables:
CARGO_HOME: $CI_PROJECT_DIR/cargo
APT_CACHE_DIR: $CI_PROJECT_DIR/apt
{
"version": "0.2.0",
"debugServer": 4711,
"configurations": [
{
"name": "Launch",
"type": "go",
"request": "launch",
"mode": "debug",
"program": "${workspaceRoot}",
tap "caskformula/caskformula"
tap "caskroom/cask"
tap "caskroom/versions"
tap "homebrew/bundle"
tap "homebrew/completions"
tap "homebrew/core"
tap "homebrew/dupes"
tap "homebrew/nginx"
tap "homebrew/php"
tap "homebrew/services"
# Linux Example (assumes ~/bin is in PATH).
curl -sL -o ~/bin/gvm https://github.com/andrewkroh/gvm/releases/download/v0.0.5/gvm-linux-amd64
chmod +x ~/bin/gvm
eval "$(gvm 1.10)"
go version
function go_162 {
export GOROOT="/Users/fincep005/.gvm/versions/go1.6.2.darwin.amd64"
export PATH="$GOROOT/bin:$PATH"
}
@karuna
karuna / rocketguide.md
Created March 11, 2018 05:38 — forked from belst/rocketguide.md
Deploy Rocket in production

Deploy Rocket using Letsencrypt and nginx

Information

This guide uses the domain your-domain.tld and its www. prefixed version. It starts the rocket application on 127.0.0.1:1337 and as the user www-data. The proxy listens on port 80 and 443 though.
If you need other values, update them accordingly in your nginx and systemd configs.

Prerequisites

You need to have nginx, certbot and rust installed.

@karuna
karuna / FieldArraysForm.js
Created February 1, 2018 08:28 — forked from erikras/FieldArraysForm.js
Example showing how to use a formValueSelector on an individual array item
/**
The following can replace the file in the Field Arrays example
(https://github.com/erikras/redux-form/tree/master/examples/fieldArrays) to demonstrate this functionality.
**/
import React from 'react'
import { connect } from 'react-redux'
import { Field, FieldArray, reduxForm, formValueSelector } from 'redux-form'
import validate from './validate'
@karuna
karuna / gotham
Last active January 8, 2018 07:33
Rails + Rocket Benchmark
This is ApacheBench, Version 2.3 <$Revision: 1807734 $>
Copyright 1996 Adam Twiss, Zeus Technology Ltd, http://www.zeustech.net/
Licensed to The Apache Software Foundation, http://www.apache.org/
Benchmarking localhost (be patient)
Completed 100 requests
Completed 200 requests
Completed 300 requests
Completed 400 requests
Completed 500 requests