This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private DTE2 _applicationObject; | |
private AddIn _addInInstance; | |
private string _githubClientId = @"d15081f5f72ba1075e40"; | |
private string _githubClientSecret = @"68d71642fc2b8872cfa1b2358f03289dbfd656a4"; | |
private string _githubScopes = @"gist"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Net.Http; | |
using Extensibility; | |
using EnvDTE; | |
using EnvDTE80; | |
using Microsoft.VisualStudio.CommandBars; | |
using System.Resources; | |
using System.Reflection; | |
using System.Globalization; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#init evernote client | |
def initEvernote(self): | |
# Real applications authenticate with Evernote using OAuth, but for the | |
# purpose of exploring the API, you can get a developer token that allows | |
# you to access your own Evernote account. To get a developer token, visit | |
# https://sandbox.evernote.com/api/DeveloperToken.action | |
if self.authToken == "": | |
self.authToken = input("Please input your dev token: ") | |
if self.authToken == "": |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
print("first example") | |
print("second", "example") | |
print("%s"%("third example")) | |
print("%(forth)s"%{'forth':'forth example'}) | |
fifth = "fifth example" | |
print("%(fifth)s"%vars()) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#calculate hashcode for media | |
md5 = hashlib.md5() | |
md5.update(attachment.data.body) | |
hashcode = md5.hexdigest() | |
print("hast code: ", hashcode) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# List all of the notebooks in the user's account | |
notebooks = noteStore.listNotebooks(authToken) | |
print("Found ", len(notebooks), " notebooks:") | |
#calculate processed blog count currently | |
processedBlogCount = 0 | |
for notebook in notebooks: | |
print(" * ", notebook.name) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ping search engine's ping service | |
# http://ping.baidu.com/ping/RPC2 | |
# http://rpc.pingomatic.com/ | |
# http://api.moreover.com/ping | |
# http://api.my.yahoo.com/rss/ping | |
# http://blogsearch.google.com/ping/RPC2 | |
# http://ping.bitacoras.com | |
# http://ping.feedburner.com | |
# http://ping.syndic8.com/xmlrpc.php | |
# http://rpc.blogrolling.com/pinger/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pingServiceUrls = open("pingcfg", "r", encoding='utf-8-sig') | |
pingServiceUrls.seek(0) | |
self.pingServiceUrls = pingServiceUrls.readlines() | |
print(self.pingServiceUrls) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
self.isCreateTags = config["isCreateTags"] == str(True) | |
self.syncNotebook = config["syncNotebook"] | |
self.isUsingCSDNBlog = config["isUsingCSDNBlog"] == str(True) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#read config | |
input_text = open('config', "r", encoding='utf-8-sig').read() | |
input_json = "{%(input_text)s}" % vars() | |
reader = json.JSONDecoder() | |
config = reader.decode(input_json) |
NewerOlder