Skip to content

Instantly share code, notes, and snippets.

View able8's full-sized avatar

Able Lv able8

View GitHub Profile
@able8
able8 / Export Notes.AppleScript
Created May 16, 2017 08:34
Export Apple Notes via AppleScript
tell application "TextEdit"
activate
make new document
end tell
tell application "Notes"
if folder "Archive" exists then
set output to ""
repeat with aNote in notes in folder "Archive"
@able8
able8 / Export Notes.AppleScript
Created May 16, 2017 08:34
Export Apple Notes via AppleScript
tell application "TextEdit"
activate
make new document
end tell
tell application "Notes"
if folder "Archive" exists then
set output to ""
repeat with aNote in notes in folder "Archive"
set theDate to do shell script "date '+%Y-%m-%d'"
set outputPath to "~/Dropbox/mytemp/"
set format to "txt"
set counter to 1
set theFolder to "Notes"
-- uses a counter to avoid duplicate filenames if notes have the same title
tell application "Notes"
tell folder theFolder
set theNotes to every note
@able8
able8 / 0_reuse_code.js
Created August 2, 2017 07:59
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console

README

该文件用来测试和展示书写README的各种markdown语法。 GitHub的markdown语法在标准的markdown语法基础上做了扩充,称之为GitHub Flavored Markdown。简称GFM,GFM在GitHub上有广泛应用,除了README文件外,

issues和wiki均支持markdown语法。

|Author|果冻虾仁|

@able8
able8 / crawler.py
Created August 2, 2017 09:21 — forked from dongguosheng/crawler.py
A simple crawler based on requests and pyquery.
# -*- coding: utf-8 -*-
'''
1. Construct the url with num_iid, eg: http://a.m.tmall.com/i15110720150.htm, 15110720150 is the num_iid.
2. Get the html text.
3. Parse the img urls and insert the num_iid and img urls into sqlite.
'''
import requests
from pyquery import PyQuery as pq

PYTHON-基础-时间日期处理小结

  • 涉及对象

    • datetime
    • timestamp
    • time tuple
    • string
    • date
  • datetime基本操作

@able8
able8 / python.json
Created July 27, 2018 05:27
python snippet
{
// Place your snippets for python here. Each snippet is defined under a snippet name and has a prefix, body and
// description. The prefix is what is used to trigger the snippet and the body will be expanded and inserted. Possible variables are:
// $1, $2 for tab stops, $0 for the final cursor position, and ${1:label}, ${2:another} for placeholders. Placeholders with the
// same ids are connected.
// Example:
// "Print to console": {
// "prefix": "log",
// "body": [
// "console.log('$1');",