Skip to content

Instantly share code, notes, and snippets.

@ikasamah
ikasamah / index.js
Created February 10, 2018 20:15
Dialogflow fulfillment to post to slack
'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
@ikasamah
ikasamah / install_font.py
Created November 29, 2011 09:58
管理者権限なしでWindowsにフォントをインストール
# -*- coding: utf-8 -*-
import os, ctypes
from fnmatch import fnmatch
#
# install_font.py
#
# for Windows
# 管理者権限なしでフォントをインストールします.(ログアウトまで有効)
@ikasamah
ikasamah / gist:1106075
Created July 26, 2011 05:53
vim color list for xterm-256
<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; }
-->
# -*- 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
#!/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'