Skip to content

Instantly share code, notes, and snippets.

View kennethteh90's full-sized avatar

Kenneth Teh kennethteh90

View GitHub Profile

Welcome to Kenneth Teh's Github Map!

This is a map of my Github. You can skip to the repos here (GitHub Page) or read on for an overview of my projects.

Projects

My side projects
  • Guest Tracking System (Rails) - this simple app solved an annoying problem for us in church. Basically, we were using a group chat for our host team to keep track of new guests in church, but the issue was that we didn't have a common list that could be added to or edited. Instead, we were manually copying and pasting previous lists, then adding to/editing them. Blog post here.
  • Birthday/Event Reminder App (Google Apps Script) - wrote a few lines of code to make my initial 'app' accessible to non-coders. This app sends reminder messages to a chat group through the Telegram bot API.
Rails
@jaydlawrence
jaydlawrence / check_hashrate_reboot.py
Last active June 28, 2019 21:28
Script to check the hashrate of ethereum worker on ethOs and reboot if the hashrate is 0 for 2 runs of this script. This script is for a single GPU, or rather it will only reboot if the overall hashrate reaches 0. It also uses the pushover service to push notifications for when the script triggers a reboot.
import subprocess
import os
import re
import sys
import argparse
import httplib, urllib
import time
"""
# place this file at /home/ethos/check_hash_reboot.py
@brasic
brasic / clear_redis_script.rb
Last active October 13, 2020 19:52
Clear a large number of redis keys by pattern using SCAN and pipelining
#!/usr/bin/env ruby
require 'redis'
# Clear a large number of keys matching a pattern using SCAN and
# pipelining to avoid killing the server.
class ClearKeys
def initialize(pattern, host='localhost', postprocess_pattern=nil)
@redis = Redis.new(host: host)
@pattern = pattern
@sogko
sogko / app.js
Last active November 8, 2022 12:31
gulp + expressjs + nodemon + browser-sync
'use strict';
// simple express server
var express = require('express');
var app = express();
var router = express.Router();
app.use(express.static('public'));
app.get('/', function(req, res) {
res.sendfile('./public/index.html');