Skip to content

Instantly share code, notes, and snippets.

View theho's full-sized avatar

James Ho theho

View GitHub Profile
@theho
theho / ubuntu_nvidia_ethminer_setup.sh
Last active June 14, 2022 12:11
Scripts to setup headless ubuntu ethminer for nvidia card
# https://askubuntu.com/questions/799184/how-can-i-install-cuda-on-ubuntu-16-04
# https://www.perfacilis.com/blog/crypto-currency/mining-ethereum-on-ubuntu-with-ethminer.html
# https://gist.github.com/johnstcn/add029045db93e0628ad15434203d13c
# https://wiki.archlinux.org/index.php/NVIDIA/Tips_and_tricks
sudo apt update
sudo apt upgrade
sudo apt-get purge nvidia-cuda*
@theho
theho / nginx.conf
Created December 2, 2017 15:38 — forked from duckfullstop/nginx.conf
nginx-rtmp at LAN sample configuration
##################
## LANSTREAM ##
##################
# This is a sample configuration file
# Please don't copy and paste this exactly, read through it and understand what you're doing
# nginx-rtmp can be a little strange when working multithreaded, so we turn it off
worker_processes 1;
@theho
theho / c920_ffmpeg_nginx.md
Last active November 29, 2017 15:57
C920 streaming using nginx-rtmp

Setup Nginx


# /usr/local/nginx/conf/nginx.conf
worker_processes  auto;
events {
    worker_connections  1024;
}

# RTMP configuration
@theho
theho / ngrxintro.md
Created August 27, 2016 17:28 — forked from btroncone/ngrxintro.md
A Comprehensive Introduction to @ngrx/store - Companion to Egghead.io Series

#Comprehensive Introduction to @ngrx/store By: @BTroncone

Also check out my lesson @ngrx/store in 10 minutes on egghead.io!

Update: Non-middleware examples have been updated to ngrx/store v2. More coming soon!

Table of Contents

from cassandra.cluster import Cluster
from cassandra.auth import PlainTextAuthProvider
#
auth_provider = PlainTextAuthProvider(
username='jimmy', password='??????')
cluster = Cluster(contact_points=['dse1'], auth_provider=auth_provider)
session = cluster.connect()
#
"""
Single Node Cassandra/Spark using pySpark
"""
import os
import sys
SPARK_HOME = "/Users/jimmy/dev/spark"
os.environ['SPARK_HOME'] = SPARK_HOME
@theho
theho / backend-architectures.md
Created October 6, 2015 13:13 — forked from ragingwind/Backend Architectures Keywords and References.md
Backend Architectures Keywords and References. #wiki
@theho
theho / q_chain.py
Created May 20, 2015 00:07
Methon chaining inspired by $q / Q in Javascript
# Inspired by $q/Q in javascript to chain methods
class Q:
def __init__(self, d):
self.d = d
self.error = None
def then(self, fn):
if not self.error:
try: