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 / ShadowedButton.swift
Created Jun 10, 2016
影つきの UIButton のサブクラスです。
View ShadowedButton.swift
class ShadowedButton : UIButton {
override func willMoveToSuperview(newSuperview: UIView?) {
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 / money_forward_pending_credits.user.js
Last active May 13, 2016
View money_forward_pending_credits.user.js
// ==UserScript==
// @name MoneyForwardでクレカの未確定残高もチェック
// @namespace
// @version 0.2
// @description MoneyForwardのトップページ左上の総資産から、未確定のカード残高を引いて表示してくれるやつ。Tampermonkeyとか使えばインストールできるっぽいです。(Developed by: Twitter/GitHub @AknEp )
// @author AknEp
// @match
// ==/UserScript==
'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.
$('').each(function(index,that){ d($(that).attr('id')); $('#ext-gen148').click() })
AknEp / PIUtilities.h
Created May 1, 2013
Photoshop CS6 SDK を XCode4.6.1 でビルドする ref:
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 / file0.txt
Created Apr 17, 2013
Redmine2.3.0をサブディレクトリで動かす(Ruby2.0版) ref:
View file0.txt
$ cd your-web-document-root
$ ln -s /usr/share/redmine-2.3.0 redmine
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."
elsif answer == "n"
puts "You choose no. See you."
puts "You typed #{answer} , you must type y or n."
You can’t perform that action at this time.