Skip to content

Instantly share code, notes, and snippets.

@pipoket
pipoket / clock.html
Created October 4, 2019 06:22 — forked from sam0737/clock.html
OBS Studio: A HTML page for showing current date and time in the video
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>A simple clock</title>
</head>
<body translate="no" >
@pipoket
pipoket / nginx.conf
Last active May 1, 2017 13:14 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@pipoket
pipoket / flume.py
Last active August 29, 2015 14:14 — forked from dustin/flume.py
#!/usr/bin/env python
#
# tap -> flume
#
# requires: python thrift bindings + compiled flume thrift binding.
#
import sys
import time
import struct
@pipoket
pipoket / counter.py
Created July 2, 2012 01:29 — forked from ericmoritz/counter.py
A counter stored in Riak that handles conflict resolutions on read
import logging
import riak
log = logging.getLogger(__name__)
class RiakCounter(object):
def __init__(self, bucket, key):
self.bucket = bucket
self.bucket.set_allow_multiples(True)
self.key = key
@pipoket
pipoket / gethreading.py
Created November 25, 2011 07:37 — forked from serialx/gethreading.py
gevent getthreading
import gevent, gevent.event
import threading, Queue, collections, time, functools
def _threads_poller_f():
while _OsThread._threads_count:
try:
t, rv, isexc = _OsThread._threads_results.get_nowait()
except Queue.Empty:
gevent.sleep()
else: