Skip to content

Instantly share code, notes, and snippets.

View YasuakiHirano's full-sized avatar
🎮

yasuaki hirano YasuakiHirano

🎮
View GitHub Profile
"Need Treeを追加している場合
noremap <C-N><C-N> ::NERDTreeToggle<CR>
"透過設定
autocmd GUIEnter * set transparency=240
"gvimでやる場合はcolorscheme設定 molokai or solarized
"colorscheme molokai
colorscheme solarized
set background=dark
@YasuakiHirano
YasuakiHirano / TestArray.java
Last active August 29, 2015 14:02
array and collection Test
import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.Iterator;
/**
* java array test
<html ng-app="testApp">
<head>
<meta charset="utf-8" />
<script src="angular.min.js"></script>
<script src="controller.js"></script>
</head>
<body>
<div>
<a href="https://github.com/YasuakiHirano/pgfun/tree/master/src/angulartest">this source</a>
</div>
var testApp = angular.module('testApp', []);
testApp.controller('PhoneListCtrl', function($scope){
$scope.phones = [
{'name': 'Nexus S',
'snippet': 'Fast just got faster with Nexus S.'},
{'name': 'Motorola XOOM with Wi-Fi',
'snippet': 'The Next, Next Generation tablet.'},
{'name': 'MOTOROLA XOOM',
'snippet': 'The Next, Next Generation tablet.'}
<html>
<head>
<meta charset="utf-8" />
<title>TestPage</title>
<script>
function hello(){
alert("hello, world");
}
</script>
</head>
<html>
<head>
<meta charset="utf-8" />
<title>TestPage</title>
<script src="./hello.js"></script>
</head>
<body>
<input type="button" onclick="hello()" value="実行">
</body>
</html>
function hello(){
alert("hello, world");
}
@YasuakiHirano
YasuakiHirano / page.php
Created December 31, 2015 06:51
wp simple page php
<?php get_header();?> <!--ヘッダー取得-->
<?php get_template_part('header','page'); ?> <!--ページ用のヘッダー取得・不要な場合は削除-->
<div id="main">
<div id="contents">
<?php if(have_posts()): while(have_posts()): the_post(); ?>
<div class="entry">
<h2 id="title">
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h2>
<div class="entry_main">
@YasuakiHirano
YasuakiHirano / functions.php
Created December 31, 2015 07:03
simple wp functions.php
<?php
// アイキャッチ画像設定 => アイキャッチ画像を使うかの設定と、サイズを設定している
add_theme_support('post-thumbnails');
set_post_thumbnail_size(300, 200, true);
//カスタムメニューの実装 => 下記記述で、カスタムメニューが使えるようになる
register_nav_menus(array('main_navigation' => 'primaryNavi'));
// 管理画面からサイドバーの設定をできるようにする。
@register_sidebar();
if has('reltime')
let match_end = matchend(reltimestr(reltime()), '\d\+\.') + 1
let rand = reltimestr(reltime())[match_end : ] % (4 + 1)
echo rand
if rand == 1
colorscheme molokai
endif
if rand == 2
colorscheme solarized
endif