Skip to content

Instantly share code, notes, and snippets.

View tany3's full-sized avatar
😇
I may be slow to respond.

Masahiro Taniuchi tany3

😇
I may be slow to respond.
  • Tokyo, Japan
View GitHub Profile
@tany3
tany3 / Contents.json
Created May 19, 2018 05:56
[iOS] AppIcon.appiconset
{
"images" : [
{
"size" : "20x20",
"idiom" : "iphone",
"filename" : "Icon-20@2x.png",
"scale" : "2x"
},
{
"size" : "20x20",
@tany3
tany3 / makeAppIcons.sh
Created May 19, 2018 05:53
[iOS] make app icons by sips
sips -Z 120 Icon.png --out Icon-60@2x.png
sips -Z 180 Icon.png --out Icon-60@3x.png
sips -Z 76 Icon.png --out Icon-76@.png
sips -Z 152 Icon.png --out Icon-76@2x.png
sips -Z 167 Icon.png --out Icon-83.5@2x.png
sips -Z 29 Icon.png --out Icon-29@.png
sips -Z 58 Icon.png --out Icon-29@2x.png
sips -Z 87 Icon.png --out Icon-29@3x.png
sips -Z 40 Icon.png --out Icon-40@.png
sips -Z 80 Icon.png --out Icon-40@2x.png
@tany3
tany3 / 例外をキャッチして再スローするとスタックトレースが途切れるヤツ.linq.cs
Created April 12, 2018 12:05
例外をキャッチして再スローするとスタックトレースが途切れるヤツ
// https://msdn.microsoft.com/ja-jp/library/ms229005(v=vs.100).aspx
// 例外をキャッチして再スローする場合は、空の throw を使用してください。 例外呼び出し履歴を保持するには、これが最善の方法です。
void Main()
{
try
{
DoSomething1();
}
catch (Exception ex)
@tany3
tany3 / twitter.gs
Created September 17, 2017 07:59 — forked from kijtra/twitter.gs
Google Apps Script での 「oAuthConfig」のサポート終了後用の Twitter API スクリプト。「OAuth1」ライブラリ(ID:Mb2Vpd5nfD3Pz-_a-39Q4VfxhMjh3Sh48)が必要。
// 最初にこの関数を実行し、ログに出力されたURLにアクセスしてOAuth認証する
function twitterAuthorizeUrl() {
Twitter.oauth.showUrl();
}
// OAuth認証成功後のコールバック関数
function twitterAuthorizeCallback(request) {
return Twitter.oauth.callback(request);
}
@tany3
tany3 / Program.cs
Created February 12, 2015 22:53
C# デバッガを起動する
using System;
using System.Diagnostics;
namespace DebuggerTest
{
class Program
{
static void Main(string[] args)
{
#if DEBUG
@tany3
tany3 / new_gist_file_0
Created January 15, 2015 06:20
VirtualBox resize vdi
c:\Program Files\Oracle\VirtualBox>VBoxManage.exe clonehd "D:\src.vdi" "D:\dst.vdi"
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
Clone hard disk created in format 'VDI'. UUID: ****
c:\Program Files\Oracle\VirtualBox>VBoxManage.exe modifyhd "D:\dst.vdi" --resize 153600
0%...10%...20%...30%...40%...50%...60%...70%...80%...90%...100%
@tany3
tany3 / StopWebSites.ps1
Last active August 29, 2015 14:12
PowerShell-StopSites
#
#stop web site
#
$targetSiteNames = ( "WebSite1", "WebSite2" )
$targetAppPools = ( "AppPool1", "AppPool2" )
"Settings.Target Sites:"
foreach ($name in $targetSiteNames) { "`t" + $name }
"Settings.Target AppPools:"
foreach ($name in $targetAppPools) { "`t" + $name }
@tany3
tany3 / StartWebSItes.ps1
Created December 25, 2014 10:07
PowerShell-StartSites
#
#start web site
#
$targetSiteNames = ( "WebSite1", "WebSite2" )
$targetAppPools = ( "AppPool1", "AppPool2" )
"Settings.Target Sites:"
foreach ($name in $targetSiteNames) { "`t" + $name }
"Settings.Target AppPools:"
foreach ($name in $targetAppPools) { "`t" + $name }
@tany3
tany3 / lsWebApps.ps1
Created December 25, 2014 09:18
List of IIS Applications
#
#see http://melcher.it/2013/03/powershell-list-all-iis-webapplications-net-version-state-identity/
#
try{
Import-Module WebAdministration
Get-WebApplication
$webapps = Get-WebApplication
$list = @()
foreach ($webapp in get-childitem IIS:\AppPools\)
@tany3
tany3 / CSChatworkAPISample.cs
Created December 18, 2014 03:25
CSChatworkAPISample
using System;
using CSChatworkAPI;
namespace Example
{
class Program
{
static void Main(string[] args)
{
var client = new ChatworkClient(@"APIToken"); // TODO:APIToken