This file contains 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
#!/usr/bin/env python | |
# -*- coding: utf-8 -*- | |
import sys, urllib2,json | |
# | |
# to get your API key, access following: | |
# https://code.google.com/apis/console/ | |
# | |
API_URL = 'https://www.googleapis.com/urlshortener/v1/url' |
This file contains 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
# -*- coding: utf-8 -*- | |
import math | |
def is_prime(n): | |
for i in xrange(2, int(math.sqrt(n)) + 1): | |
if not n % i: | |
return False | |
return True |
This file contains 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
<html> | |
<body> | |
<title>vim color list for xterm-256</title> | |
<style> | |
<!-- | |
body { font-family:monospace; } | |
td { width:160px; text-align:center; padding:3px 0; } | |
.r { color: #fff; } | |
--> |
This file contains 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
# -*- coding: utf-8 -*- | |
import os, ctypes | |
from fnmatch import fnmatch | |
# | |
# install_font.py | |
# | |
# for Windows | |
# 管理者権限なしでフォントをインストールします.(ログアウトまで有効) |
This file contains 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
'use strict'; | |
const SlackBot = require('slackbots'); | |
const channel = '<CHANNEL_TO_POST>'; | |
const bot = new SlackBot({ | |
token: '<SLACK_BOT_TOKEN>' | |
}); | |
const functions = require('firebase-functions'); // Cloud Functions for Firebase library | |
const DialogflowApp = require('actions-on-google').DialogflowApp; // Google Assistant helper library |