Skip to content

Instantly share code, notes, and snippets.

@cdpath
cdpath / full_text_rss.json
Created May 14, 2018 11:08
Full-text RSS with Huginn
{
"schema_version": 1,
"name": "RSS",
"description": "Design Daily",
"source_url": false,
"guid": "34862db1b1318cda2d8b50a94908ffa3",
"tag_fg_color": "#ffffff",
"tag_bg_color": "#ff8000",
"icon": "signal",
"exported_at": "2018-05-14T11:06:25Z",
@cdpath
cdpath / anki.CSS
Created May 2, 2018 14:32
anki template
ruby rt {
visibility: hidden;
}
ruby:hover rt {
visibility: visible;
}
.card {
font-family: Noto Sans CJK JP Regular;
@cdpath
cdpath / join.py
Created March 6, 2018 10:28
join() method of thread
import threading
import logging
from time import sleep
logging.basicConfig(level=logging.DEBUG,
format='(%(threadName)-10s) %(message)s',
)
@cdpath
cdpath / app.py
Created January 24, 2018 07:28
requests with msgpack
import msgpack
from flask import Flask, request, jsonify
from flask.wrappers import Request
class RequestWithMsgPackSupport(Request):
@property
def is_msgpack(self):
return self.mimetype == 'application/msgpack'
@cdpath
cdpath / test_threading.py
Last active January 15, 2018 09:00
Python threading with Exception catching
#!/usr/bin/python
# -*- coding: utf-8 -*-
from time import sleep
import sys
import threading
import Queue
ERROR_OCCURRED = object()
@cdpath
cdpath / convert.py
Last active November 28, 2017 03:39
Marvin(iOS) annotations to My Clippings.txt(Kindle)
# -*- coding: utf-8 -*-
import csv
import locale
import datetime as dt
from collections import namedtuple
def clean_bom(lines):
-- credit
-- https://medium.com/@igloude/using-applescript-and-btt-to-make-the-airpods-experience-a-little-bit-better-6e78b12d33bd
tell application "System Events" to tell process "SystemUIServer"
set bt to (first menu bar item whose description is "bluetooth") of menu bar 1
click bt
tell (first menu item whose title is "YOUR_DEVICE_NAME") of menu of bt
click
tell menu 1
if exists menu item "Connect" then
@cdpath
cdpath / wechat.json
Last active December 11, 2024 02:25
使用 Huginn 实现微信公众号全文 RSS
{
"schema_version": 1,
"name": "WeChat",
"description": "微信公众号全文 RSS",
"source_url": false,
"guid": "dd67102f09869c2228f8ed903a32d063",
"tag_fg_color": "#333333",
"tag_bg_color": "#66ff66",
"icon": "leaf",
"exported_at": "2019-01-12T10:56:41Z",
@cdpath
cdpath / GitHub-Forking.md
Created November 10, 2016 06:11 — forked from Chaser324/GitHub-Forking.md
GitHub Standard Fork & Pull Request Workflow

Whether you're trying to give back to the open source community or collaborating on your own projects, knowing how to properly fork and generate pull requests is essential. Unfortunately, when I started going through the process of forking and issuing pull requests, I had some trouble figuring out the proper method for doing so and made quite a few mistakes along the way. I found a lot of the information on GitHub and around the internet to be rather piecemeal and incomplete - part of the process described here, another there, common hangups in a different place, and so on.

In an attempt to coallate this information for myself and others, this short tutorial is what I've found to be fairly standard procedure for creating a fork, doing your work, issuing a pull request, and merging that pull request back into the original project.

Creating a Fork

Just head over to the GitHub page and click the "Fork" button. It's just that simple. Once you've done that, you can use your favorite git client to clone your