Skip to content

Instantly share code, notes, and snippets.

View ykws's full-sized avatar
🏠
Working from home

KAWASHIMA Yoshiyuki ykws

🏠
Working from home
View GitHub Profile
@ykws
ykws / file0.txt
Last active August 29, 2015 14:27 — forked from roothybrid7/file0.txt
Xcode 5.1にupdateした後に、使えなくなったxcode plug-inを再び使えるようにする方法 ref: http://qiita.com/roothybrid7/items/85bacb992a22aaad04cd
find ~/Library/Application\ Support/Developer/Shared/Xcode/Plug-ins -name Info.plist | xargs -IFILE defaults write FILE DVTPlugInCompatibilityUUIDs -array-add A2E4D43F-41F4-4FB9-BB94-7177011C9AED
@ykws
ykws / MovieViewController.m
Last active December 24, 2015 07:03
Play Movie on iOS with full screen, landscape and no control
#import "MovieViewController.h"
#import <MediaPlayer/MediaPlayer.h>
@interface MovieViewController ()
@property (strong, nonatomic) MPMoviePlayerController *player;
@end
@implementation MovieViewController
@ykws
ykws / MainViewController.m
Created December 24, 2015 07:05
Play background music on iOS
#import "MainViewController.h"
#import <AVFoundation/AVFoundation.h>
@interface MainViewController ()
@property (strong, nonatomic) AVAudioPlayer *player;
@end
@implementation MainViewController
@ykws
ykws / split.java
Created October 31, 2016 11:36
String#split return arrays with empty values
String str = ",,,";
String[] arrays = str.split(",", -1);
# arrays => ["", "", "", ""]
# arrays.length => 4
@ykws
ykws / split.java
Created October 31, 2016 11:38
String#split return empty array with empty values
String str = ",,,";
String[] arrays = str.split(",");
# arrays => []
# arrays.length => 0
String str = ",,,";
String[] arrays = str.split(",", -1)
# arrays => ["", "", "", "", ""]
# arrays.length => 4
@ykws
ykws / round.java
Created October 31, 2016 13:48
Caution: DecimalFormat round by default ref: http://qiita.com/ykws/items/11218e2b21d4a1e93567
DecimalFormat df = new DecimalFormat();
df.setRoundingMode(RoundingMode.HALF_UP);
<!DOCTYPE html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<body onLoad="alert('hello');">
@ykws
ykws / backup.bat
Last active November 15, 2016 16:29
Tips: Automatically backup Bitnami Redmine for Windows ref: http://qiita.com/ykws/items/f206078f8710ceb9fe82
@echo off
<Bitnami Redmine Install Drive. If C was C:>
cd <Bitnami Redmine Install Path by htdocs>
<Bitnami mysql Install Path>mysqldump -u root -p<password> bitnami_redmine > backup.sql
net use <Share Files Server Path[=SFSP]>
copy config¥database.yml <SFSP> /Y