Skip to content

Instantly share code, notes, and snippets.

View goodjob1114's full-sized avatar

Randy Chen goodjob1114

View GitHub Profile
@akhdaniel
akhdaniel / PostgreSQL HA on Kubernetes.md
Last active January 23, 2024 07:57
PostgreSQL HA on Kubernetes

PostgreSQL High Availibility on Kubernetes

  • Installation
  • Create PostgreSQL Cluster
  • Connect to a PostgreSQL Cluster
    • psql
    • pgAdmin
  • Updating PostgreSQL Cluster
  • High Availability
@meduzen
meduzen / timer.js
Last active November 24, 2023 12:56
Approach for using setInterval / setTimeout in a vue-x store
const MILLISECONDS_PER_MINUTES = 1000 * 60;
const state = {
now: (new Date()),
intervalTimer: null,
};
const mutations = {
now(state) {
state.now = new Date();
@skolhustick
skolhustick / App.js
Created May 25, 2020 07:55
ChakraUI - Login Form with ColorMode
import React from 'react'
import {
ThemeProvider,
theme,
ColorModeProvider,
CSSReset,
Box,
Flex,
IconButton,
useColorMode,
@plong0
plong0 / CategoryTree.vue
Last active September 2, 2021 18:20
Demo of using single-select Radio Group with Vuetify Treeview
<template>
<v-card>
<v-card-text>
{{ category }}
<radio-tree :items="categories" value-key="id" v-model="category" ref="radioTree"></radio-tree>
</v-card-text>
<v-card-actions>
<v-btn @click.stop="nuke()" color="warning">Nuke</v-btn>
</v-card-actions>
</v-card>
@decatur
decatur / ipc.py
Last active June 18, 2023 16:55
Fast inter-process communication (ipc) for python on MS-Windows using shared memory and eventing.
# -*- coding: utf-8 -*-
"""
Copyright 2018-09-09, Wolfgang Kühn
Fast inter-process communication (ipc) for Python (CPython, PyPy, 2.7, 3.6+) on MS-Windows.
It uses shared memory and eventing.
Example rpc style synchronization:
Server (rpc provider):
@ceejbot
ceejbot / esm_in_node_proposal.md
Last active June 20, 2024 10:45
npm's proposal for supporting ES modules in node

ESM modules in node: npm edition

The proposal you’re about to read is not just a proposal. We have a working implementation of almost everything we discussed here. We encourage you to checkout and build our branch: our fork, with the relevant branch selected. Building and using the implementation will give you a better understanding of what using it as a developer is like.

Our implementation ended up differing from the proposal on some minor points. As our last action item before making a PR, we’re writing documentation on what we did. While I loathe pointing to tests in lieu of documentation, they will be helpful until we complete writing docs: the unit tests.

This repo also contains a bundled version of npm that has a new command, asset. You can read the documentation for and goals of that comma

@Chun-Lin
Chun-Lin / History|-bed935b|WALg.json
Last active May 25, 2022 03:17
Visual Studio Code Settings Sync Gist
{
"sync.gist": "3d21f64bee06ae95f3d1b7064f3784ba"
}
@bsodmike
bsodmike / README.md
Last active October 19, 2024 12:29
OC Nvidia GTX1070s in Ubuntu 16.04LTS for Ethereum mining

Following mining and findings performed on EVGA GeForce GTX 1070 SC GAMING Black Edition Graphics Card cards.

First run nvidia-xconfig --enable-all-gpus then set about editing the xorg.conf file to correctly set the Coolbits option.

# /etc/X11/xorg.conf
Section "Device"
    Identifier     "Device0"
    Driver         "nvidia"
    VendorName     "NVIDIA Corporation"
@rmosolgo
rmosolgo / Gemfile
Last active March 27, 2023 08:38
GraphQL Ruby Subscriptions
source 'https://rubygems.org'
gem "graphql", github: "rmosolgo/graphql-ruby", branch: "subscriptions"
gem "sinatra"
gem "thin"

Install dlib and face_recognition on a Raspberry Pi

Instructions tested with a Raspberry Pi 2 with an 8GB memory card. Probably also works fine on a Raspberry Pi 3.

Steps

Download the latest Raspbian Jessie Light image. Earlier versions of Raspbian won't work.

Write it to a memory card using Etcher, put the memory card in the RPi and boot it up.