Skip to content

Instantly share code, notes, and snippets.

@kurohai
kurohai / spauth.py
Last active August 29, 2015 14:17 — forked from juntalis/spauth.py
import os
import requests
import re
from pprint import pprint
from htmlentitydefs import name2codepoint
from simplejson import loads
class spauth:
@kurohai
kurohai / POP3_TLS
Created May 22, 2015 14:23
POP3_SSL Wrapper to support TLSv1 or any other SSL version.
"""POP3_SSL Wrapper to support TLSv1 or any other SSL version"""
__all__ = ['POP3_TLS']
import socket
from poplib import POP3_SSL, POP3_SSL_PORT
import ssl
@kurohai
kurohai / communication.py
Created May 22, 2015 14:36
Monkey patch for Bots' communication.py to support POP3 and TLSv1.
import os
import sys
import posixpath
import time
import datetime
import glob
import shutil
import fnmatch
import zipfile
if os.name == 'nt':
@kurohai
kurohai / supervisor-config-autossh.ini
Last active July 9, 2019 18:47 — forked from gtt116/gist:e7abe1c32a46df85b7599fbc7a9f9f73
autossh supervisord config file
[program:autossh]
command=autossh -M0 -N
-o "ExitOnForwardFailure yes"
-o "ServerAliveInterval 15"
-o "ServerAliveCountMax 4"
-o "ControlPath none"
-o "UserKnownHostsFile=/dev/null"
-o StrictHostKeyChecking=no
-R 1234:localhost:1234
-R 4567:localhost:4567
@kurohai
kurohai / htc_vive_virtual_keypress.py
Created January 1, 2019 18:57 — forked from notgne2/htc_vive_virtual_keypress.py
Small script to convert HTC Vive controller inputs into virtual keypresses for autohotkey (thanks to awesomebytes)
#!/usr/bin/env python
import time
import pprint
import openvr
import win32api
import win32con
"""
Convert HTC Vive inputs to virtual keypresses for autohotkey
@kurohai
kurohai / htc_vive_controller_keypresses.py
Created January 1, 2019 18:58 — forked from awesomebytes/htc_vive_controller_keypresses.py
Example on how to retrieve the HTC vive controller keypresses using pyopenvr
#!/usr/bin/env python
import time
import pprint
import openvr
"""
Get the HTC Vive controllers keypresses and print them to screen.
@kurohai
kurohai / GDI.ahk
Created January 1, 2019 19:00 — forked from G33kDude/GDI.ahk
GDI wrapper for AutoHotkey
class GDI
{
__New(hWnd, CliWidth=0, CliHeight=0)
{
if !(CliWidth && CliHeight)
{
VarSetCapacity(Rect, 16, 0)
DllCall("GetClientRect", "Ptr", hWnd, "Ptr", &Rect)
CliWidth := NumGet(Rect, 8, "Int")
CliHeight := NumGet(Rect, 12, "Int")
@kurohai
kurohai / search.py
Created February 6, 2019 13:31 — forked from mydreambei-ai/search.py
 via search engine or baidu engine spider
from __future__ import print_function
from bs4 import BeautifulSoup as bs
import requests
import logging
from itertools import count
import time
from blinker import signal
from lxml.html.clean import Cleaner
from lxml.html import tostring, fromstring, iterlinks
from selenium import webdriver
@kurohai
kurohai / index.html
Last active May 21, 2020 09:26
Ionic Core Dark Theme
<!-- @ionic/core@latest https://ionicframework.com/docs/ -->
<body>
<ion-app>
<ion-header translucent>
<ion-toolbar>
<ion-buttons slot="start">
<ion-back-button default-href="#"></ion-back-button>
</ion-buttons>