Skip to content

Instantly share code, notes, and snippets.

@thinkAmi
thinkAmi / script.user.js
Created January 29, 2012 04:14
Google Light Navbar for Screenshot
// ==UserScript==
// @name Google Light Navbar for Screenshot
// @namespace http://d.hatena.ne.jp/thinkAmi/
// @description Fork Google Light Navbar, main color is black and without cookie
// @author thinkAami
// @version 1.0
// @license MIT License
// @source https://gist.github.com/1697132
// @include http://*.google.*
// @include https://*.google.*
@thinkAmi
thinkAmi / RunMiBarcodeSample.cs
Created July 10, 2012 22:13
MiBarcodeを使いExcel出力するサンプル
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Excel = Microsoft.Office.Interop.Excel;
@thinkAmi
thinkAmi / MBSAtoCSV.cs
Created July 20, 2012 21:07
MBSAのXMLファイルからLINQ to XMLを使ってCSVファイルへと出力するサンプル
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml.Linq;
namespace MBSAToCSV
{
class Program
{
@thinkAmi
thinkAmi / SkypeLogin.cs
Created July 21, 2012 21:59
Skypeを起動してログインするプログラム (ただし、ユーザー名とパスワードが必要)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
namespace SkypeLogin
@thinkAmi
thinkAmi / ApplicationIDConverter.py
Created October 30, 2012 21:31
GAEのソースコードをGitHubで公開するときに、applicatoinを削除するコード
# -*- coding: utf-8 -*-
import sys
import yaml
from collections import OrderedDict
# OrderedDictを出力するための関数
def represent_odict(dumper, instance):
return dumper.represent_mapping(u'tag:yaml.org,2002:map', instance.items())
@thinkAmi
thinkAmi / GAEtoGitHubConverter.py
Created November 4, 2012 21:21
GAEのソースコードをGitHubで公開するときに、app.yamlのapplication・api.yamlファイルに記載したAPIキーを削除して、公開用フォルダへとコピーするコード
# -*- coding: utf-8 -*-
import sys
import os
import shutil
import yaml
from collections import OrderedDict
# OrderedDictを出力するための関数
def represent_odict(dumper, instance):
@thinkAmi
thinkAmi / GoogleFeedAPI.html
Created November 11, 2012 21:25
Google Feed API の使い方例
<!DOCTYPE html>
<html lang="ja">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" >
<!-- APIキーが必要な、以前の書き方
<script src="https://www.google.com/jsapi?key=<YOUR-API-KEY>" type="text/javascript"></script>
-->
<!-- APIキーが不要な、今の書き方 -->
<script src="https://www.google.com/jsapi" type="text/javascript"></script>
@thinkAmi
thinkAmi / BloggerAPI.html
Created November 11, 2012 21:26
Google Blogger API の使い方例
<!DOCTYPE html>
<html lang="ja">
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type" >
<script type="text/javascript" charset="utf-8" src="https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js"></script>
<script src="https://www.google.com/jsapi" type="text/javascript"></script>
<script type="text/javascript" charset="utf-8" src="W3CDTF.js"></script>
<script type="text/javascript">
var blogId = "20042392";
@thinkAmi
thinkAmi / calenarhandler.py
Created November 16, 2012 23:14
Google App EngineでGoogle Calendar API v3 を使うときのサンプル (Pythonファイルのみ)
# -*- coding: utf-8 -*-
import webapp2
import os
import yaml
from apiclient.discovery import build
from oauth2client.appengine import OAuth2Decorator
# -*- encoding: utf-8 -*-
# RubyでFromTo表現のテキストファイルを、カウントアップ表現に変換する
# 使い方
# convert.rb 変換前のファイルパス > 変換後のファイルパス
export_count = 0;
while line = gets
line.lstrip!
if line =~ /^([a-z]|[A-Z])?[0-9]{1,4}.([a-z]|[A-Z])?[0-9]{1,4}/