Skip to content

Instantly share code, notes, and snippets.

View goodjob1114's full-sized avatar

Randy Chen goodjob1114

View GitHub Profile
@goodjob1114
goodjob1114 / howToModifyOvaFile.md
Last active January 27, 2024 10:49
how to modify .ova file on linux/Mac using terminal....export vm (OVF 1.0) from virtualbox, then modify some tag and hash value for import vm to ESXi

extract ova files from an archive

$ tar -xvf vmName.ova

modify ovf for some invalid tag

$ vi vmName.ovf
@goodjob1114
goodjob1114 / cool_gpu2.sh
Created December 11, 2017 06:39 — forked from squadbox/cool_gpu2.sh
A script to control Nvidia GPU fan speed on headless (non-X) linux nodes
#!/bin/bash
# cool_gpu2.sh This script will enable or disable fixed gpu fan speed
#
# Description: A script to control GPU fan speed on headless (non-X) linux nodes
# Original Script by Axel Kohlmeyer <akohlmey@gmail.com>
# https://sites.google.com/site/akohlmey/random-hacks/nvidia-gpu-coolness
#
# Modified for newer drivers and removed old work-arounds
@goodjob1114
goodjob1114 / cloud-config.example.yaml
Last active May 4, 2022 13:10
cloud-config.yaml example for install coreos to disk....$ coreos-install -d /dev/sda -C stable -c cloud-config.yaml
#cloud-config
hostname: yourcorename
coreos:
etcd:
addr: $public_ipv4:4001
peer-addr: $private_ipv4:7001
units:
- name: etcd.service
@goodjob1114
goodjob1114 / CategoryTree.vue
Created August 20, 2021 17:29 — forked from plong0/CategoryTree.vue
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>
@goodjob1114
goodjob1114 / 寶寶.js
Created May 3, 2016 15:57 — forked from DingWeizhe/寶寶.js
新增line的功能
var fs = require('fs'),
http = require('http'),
https = require('https'),
express = require('express'),
bodyParser = require('body-parser'),
request = require('request'),
crypto = require('crypto'),
FBToken = '',
port = 443,
options = {
@goodjob1114
goodjob1114 / codility_solutions.txt
Created February 3, 2021 14:19 — forked from lalkmim/codility_solutions.txt
Codility Solutions in JavaScript
Lesson 1 - Iterations
- BinaryGap - https://codility.com/demo/results/trainingU2FQPQ-7Y4/
Lesson 2 - Arrays
- OddOccurrencesInArray - https://codility.com/demo/results/trainingFN5RVT-XQ4/
- CyclicRotation - https://codility.com/demo/results/trainingSH2W5R-RP5/
Lesson 3 - Time Complexity
- FrogJmp - https://codility.com/demo/results/training6KKWUD-BXJ/
- PermMissingElem - https://codility.com/demo/results/training58W4YJ-VHA/
@goodjob1114
goodjob1114 / ipc.py
Created January 20, 2021 03:55 — forked from decatur/ipc.py
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):
@goodjob1114
goodjob1114 / App.js
Created December 14, 2020 09:01 — forked from skolhustick/App.js
ChakraUI - Login Form with ColorMode
import React from 'react'
import {
ThemeProvider,
theme,
ColorModeProvider,
CSSReset,
Box,
Flex,
IconButton,
useColorMode,
@goodjob1114
goodjob1114 / hhvm-nginx-mariadb-installMemoOnUbuntu14.04.md
Last active July 5, 2019 16:27
hhvm, nginx, php, mariadb -> [laravel] install memo used on Ubuntu 14.04

ubuntu 14.04

sysv-rc-conf (service control tool)

sudo apt-get install -y sysv-rc-conf

nginx

sudo add-apt-repository -y ppa:nginx/stable 
@goodjob1114
goodjob1114 / example.py
Created June 29, 2019 18:48 — forked from eddieantonio/example.py
Zero-dependency Python 3 and Node IPC using UNIX sockets
#!/usr/bin/env python3
# -*- coding: UTF-8 -*-
import socket
import json
server_address = '/tmp/example.sock'
sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
sock.connect(server_address)