Skip to content

Instantly share code, notes, and snippets.

<?xml version="1.0" encoding="UTF-8"?>
<jmeterTestPlan version="1.2" properties="2.6" jmeter="2.11 r1554548">
<hashTree>
<TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="テスト計画" enabled="true">
<stringProp name="TestPlan.comments"></stringProp>
<boolProp name="TestPlan.functional_mode">false</boolProp>
<boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
<elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="ユーザー定義変数" enabled="true">
<collectionProp name="Arguments.arguments"/>
</elementProp>
@yoonchulkoh
yoonchulkoh / file0.txt
Created February 16, 2015 12:32
UILabelで行間を調節したい。ただし、折り返しの場合は行間はデフォルトで。 ref: http://qiita.com/y_koh/items/4f6c6eb3d8c8cd691c81
NSMutableAttributedString *attributedString = [[NSMutableAttributedString alloc] init];
NSArray *texts = [text componentsSeparatedByString:@"\n"];
int i = 0;
for (NSString *text in texts) {
if (i > 0) {
// 行間用の改行を追加
NSMutableAttributedString *lf = [[NSMutableAttributedString alloc] initWithString:@"\n\n"];
UIFont *font = [UIFont systemFontOfSize:4.0f];
[lf addAttribute:NSFontAttributeName value:font range:NSMakeRange(0, lf.length)];
[attributedString appendAttributedString:lf];
@yoonchulkoh
yoonchulkoh / crash_notify.js
Created June 26, 2015 01:15
Google SpreadSheetからSlackに投げるスクリプト。GAS。refs: http://qiita.com/y_koh/items/81d8648914a893ec2d16
function getCrashCount() {
SpreadsheetApp.flush();
var sheet = SpreadsheetApp.getActiveSheet();
var rows = sheet.getDataRange();
var values = rows.getValues();
var threeDaysStartRow = 22;
var yesterdayStartRow = 36;
var count = 10;
@yoonchulkoh
yoonchulkoh / main_location.min.js
Created August 12, 2015 18:10
kindle highlights
(function(b){void 0==document.createElement("div").innerText&&Object.defineProperty(HTMLElement.prototype,"innerText",{get:function(){return this.textContent},set:function(a){this.textContent=a}});var d=b.querySelector(".title").innerText,e=b.querySelector(".author").innerText,f=b.querySelectorAll(".highlight");b=b.querySelectorAll(".k4pcReadMore");var g=parseInt(document.querySelector(".boldText").innerText),c=0,a=[];a.push('<div class="book_info">');a.push('<span class="title">'+d+"</span><br />");a.push('<span class="author">'+e+"</span>");a.push("</div>");for(a.push('<div class="highlights">');c<g;c++)a.push("<hr />"),a.push("<p>"+f[c].innerText+"</p>"),a.push('<p><a href="'+b[c].href+'">'+b[c].innerText+"</a></p>");a.push("</div>");document.title=d;document.body.innerHTML=a.join("");document.body.style.fontSize = '1em'})(document);
@yoonchulkoh
yoonchulkoh / open_all_storyboards.sh
Last active September 14, 2015 01:31
Open All Storyboards and Xibs
find ./ -name "*.storyboard" -or -name "*.xib" | while read line; do open $line; done
@yoonchulkoh
yoonchulkoh / DecalGirl Bigimage Bookmarklet
Created February 27, 2011 13:09
DecalGirlのサイトの一覧画像が小さいのでサイト下に大きな画像一覧を表示するブックマークレット。 一覧の表示件数はあまり多くするとハングアップするので注意。
javascript:(
function(){
$("body").append("<a name=\"BigImageTop\"></a>");
$('div.tileditem a img').each(function(index, element){
$("body").append("<div style=\"float: left;\"><a href=\"" + $(this).attr('data-tipped') + "\"><img src=\""+ element.src.replace('100', '400') +"\" alt=\"" + element.t + "\" /><br /><p style=\"color: white\">" + element.alt + "</p></a></div>");
});
window.location.hash="BigImageTop";
}
)();
@yoonchulkoh
yoonchulkoh / ASUrl
Created February 27, 2011 13:39
AmazonURLを短くします。タイトル+URL形式でダイアログ表示します。
javascript:(function(){var%20asin=document.getElementById('ASIN').value;var%20title=document.title.slice(14);prompt('Copy%20Amazon%20Title%20&%20Short%20URL',title+'http://amazon.jp/dp/'+asin);})();
@yoonchulkoh
yoonchulkoh / シフト勤務自動入力
Last active September 25, 2015 02:17
自社出退勤管理システムシフト勤務入力用
javascript:(function(){
document.reportInput.tekiyou.options[6].selected=true; /* WF(シフト勤務) */
document.reportInput.stmEH_P.value='09'; /* 出勤時(予定) */
document.reportInput.stmEM_P.value=00; /* 出勤分(予定) */
document.reportInput.etmEH_P.value=18; /* 退勤秒(予定) */
document.reportInput.etmEM_P.value=00; /* 退勤時(予定) */
document.reportInput.stmH.value='09'; /* 出勤時 */
document.reportInput.stmM.value=00; /* 出勤分 */
document.reportInput.etmH.value=18; /* 退勤時 */
document.reportInput.etmM.value=00; /* 退勤分 */
@yoonchulkoh
yoonchulkoh / gist:1180660
Created August 30, 2011 11:02
google maps api
<!DOCTYPE html "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8"/>
<title>Google Maps</title>
<script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false"></script>
<script type="text/javascript">
function initialize() {
@yoonchulkoh
yoonchulkoh / 全てのシートをA1に揃える
Created September 13, 2011 00:45
[VBA]全てのシートをA1に揃える
Sub 全てのシートをA1に揃える()
Dim s As Object
Dim defaultSheet As Object
Set defaultSheet = ActiveSheet
For Each s In ActiveWorkbook.Sheets
s.Activate
ActiveSheet.Range("A1").Select 'A1を選択
ActiveWindow.Zoom = 100 '倍率を100%に
Next s
Worksheets(1).Activate '最後に選択しておきたいシート