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
import sys | |
from datetime import datetime | |
import fire | |
import requests | |
class SyncError(Exception): | |
def __init__(self, message): | |
self.message = message |
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
var DEFAULT_INSTAAPI_RESPONSE_DICT = { | |
"notexist": "Could not find requested member or post", | |
"unknown": "Unknown error occured" | |
}; | |
var INSTAAPI_VER = "0.1.0"; | |
var InstaApi = function (initCallBack, responseDict) { | |
if (!responseDict) responseDict = DEFAULT_INSTAAPI_RESPONSE_DICT; |
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
(* | |
Code from https://www.reddit.com/r/osx/comments/4gg3t3/batch_converting_powerpoint_2016_to_pdf_in/ | |
*) | |
on run {input, parameters} | |
tell application "Finder" | |
set theItems to input | |
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
import re | |
import jwt | |
import traceback | |
from urllib.request import urlopen | |
def verify_token(userid, token): | |
"""Firebase 개발자 문서에 제시된 토큰 검증 과정에 userid 검증 과정을 추가하여 토큰검증함수 설계 | |
:param userid: firebase auth userid value |
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
from collections import OrderedDict | |
import operator | |
class SortedDict: | |
MESSAGE_TYPEERROR = "Only the int type can be used as the key of SortedDict." | |
MESSAGE_KEYERROR = "Key %d is not exist." | |
MESSAGE_VALUEERROR = "%s is not in dict." | |
def __init__(self, _dict=None): |
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
const INTERVAL = 10000; | |
var getQueryVariable = function (key) { | |
let query = window.location.search.substring(1); | |
let vars = query.split('&'); | |
for (let i = 0; i < vars.length; i++) { | |
let pair = vars[i].split('='); | |
if (decodeURIComponent(pair[0]) == key) { | |
return decodeURIComponent(pair[1]); | |
} |