Skip to content

Instantly share code, notes, and snippets.

Satoshi Suzuki AknEp

Block or report user

Report or block AknEp

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@AknEp
AknEp / ShadowedButton.swift
Created Jun 10, 2016
影つきの UIButton のサブクラスです。
View ShadowedButton.swift
class ShadowedButton : UIButton {
override func willMoveToSuperview(newSuperview: UIView?) {
super.willMoveToSuperview(newSuperview)
self.addTarget(self, action: #selector(addShadow), forControlEvents: UIControlEvents.TouchDown)
self.addTarget(self, action: #selector(addShadow), forControlEvents: UIControlEvents.TouchDragEnter)
self.addTarget(self, action: #selector(removeShadow), forControlEvents: UIControlEvents.TouchDragExit)
self.addTarget(self, action: #selector(removeShadow), forControlEvents: UIControlEvents.TouchUpInside)
}
@AknEp
AknEp / money_forward_pending_credits.user.js
Last active May 13, 2016
MoneyForwardのトップページでクレカの未確定残高もチェックできるやつ
View money_forward_pending_credits.user.js
// ==UserScript==
// @name MoneyForwardでクレカの未確定残高もチェック
// @namespace https://github.com/AknEp
// @version 0.2
// @description MoneyForwardのトップページ左上の総資産から、未確定のカード残高を引いて表示してくれるやつ。Tampermonkeyとか使えばインストールできるっぽいです。(Developed by: Twitter/GitHub @AknEp )
// @author AknEp
// @match https://moneyforward.com
// ==/UserScript==
(function(){
'use strict';
View MethodIntegrationQuestion.m
// How to integrate such two or more methods?
- (NSString *)string:(NSString*)string withoutMatches:(NSArray*)matches
{
NSMutableString *workString = [string mutableCopy];
// 逆順にしないと複数マッチの時に場所がずれる
[matches enumerateObjectsWithOptions:NSEnumerationReverse usingBlock:^(NSTextCheckingResult* match, NSUInteger idx, BOOL *stop) {
[workString deleteCharactersInRange:match.range];
}];
View Remove All LastPass
remove all of your passwords in the LastPass.
$('.leaf.search').each(function(index,that){ d($(that).attr('id')); $('#ext-gen148').click() })
@AknEp
AknEp / PIUtilities.h
Created May 1, 2013
Photoshop CS6 SDK を XCode4.6.1 でビルドする ref: http://qiita.com/items/c6bd60b6f5a2d8b64552
View PIUtilities.h
inline Boolean PISetRect(Rect* pRect, short nLeft, short nTop, short nRight, short nBottom)
{
pRect->left = nLeft;
pRect->top = nTop;
pRect->right = nRight;
pRect->bottom = nBottom;
return true;
}
@AknEp
AknEp / file0.txt
Created Apr 17, 2013
Redmine2.3.0をサブディレクトリで動かす(Ruby2.0版) ref: http://qiita.com/items/459b08b63d0822caa7e4
View file0.txt
$ cd your-web-document-root
$ ln -s /usr/share/redmine-2.3.0 redmine
@AknEp
AknEp / yes_or_no.rb
Created Oct 20, 2012
Check the input is "y" or "n", or not.
View yes_or_no.rb
loop do
answer = gets.chomp
if answer == "y"
puts "You choose yes. See you."
break;
elsif answer == "n"
puts "You choose no. See you."
break;
else
puts "You typed #{answer} , you must type y or n."
You can’t perform that action at this time.