This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
echo ">>> Starting Install Script" | |
# Update | |
sudo apt-get update | |
# Install MySQL without prompt | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password password root' | |
sudo debconf-set-selections <<< 'mysql-server mysql-server/root_password_again password root' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// use DateTime object to turn any format of date & time into standard form | |
//Example1 | |
$date = DateTime::createFromFormat('m/d/y @ h:ia', '04/04/2014 @ 3.13pm')->getTimestamp(); | |
//Example2 | |
$date = DateTime::createFromFormat('YmdHis', '20130312000000')->getTimestamp(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[ | |
{ | |
"event": { | |
"key": "world.2014", | |
"title": "World Cup 2014" | |
}, | |
"round": { | |
"pos": 1, | |
"title": "Matchday 1", | |
"start_at": "2014\/06\/12", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
esteWatch: | |
options: | |
dirs: [ | |
'<%= app_path %>/**/' # Set all directories here | |
] | |
livereload: | |
enabled: true | |
extensions: ['html', 'css', 'php', 'twig'] # File extensions to be watched | |
port: 8888 # set vagrant forwarded_port number, default is 35729 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(function(){ | |
/* Todo: fix performance */ | |
angular.module('app', []) | |
.controller('mainCtrl', function($scope){ | |
$scope.countries = [ | |
{ country: 'Japan', language: 'Japanese' }, | |
{ country: 'Korea', language: 'Korean' }, | |
{ country: 'North Korea', language: 'Korean'}, | |
{ country: 'China', language: 'Chinese'}, | |
{ country: 'Hong Kong', language: 'Cantonese'}, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORG 8000H ; 開始番地 | |
LD SP, 0D000H ; D000番地の内容をSPに転送 | |
LD HL, 0 ; HLに0を転送 | |
LD B, 2 ; BOOO番地の内容を足す回数 | |
LOOP: PUSH BC ; 残りの繰り返す回数をスタックに記憶 | |
CALL KEISAN ; KEISANへ分岐 | |
DEC B ; レジスタBの値から1を引いて、残りの回数 | |
JP NZ, LOOP ; 残りの回数が0かどうか | |
JP KAKUNO ; 残りの回数が0なら、KAKUNOへ分岐 | |
KEISAN: POP DE ; 残りの回数をスタック上に転送 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORG 7000H ;プログラム開始番地 | |
KURIKAE: LD C,30H ;SWO-7のI/Oアドレス指定 | |
IN A, (C) ;SWO-7からデータの入力 | |
OUT (11H), A ;入力データをLEDに出力 | |
CP AA ;奇数スイッチがON | |
JP Z,OWARI ;Yes -> サブルーチンを終了 | |
JP KURIKAE ;No -> データ入力を繰り返す | |
OWARI: NOP ;ブレークポイントの位置 | |
END ; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORG 7000H ; プログラムの開始番地 | |
;メインプログラム | |
MAIN: LD BC,(8F14H) ; 音の長さを設定 | |
CALL OTODASU ; OTODASUへ分岐する | |
CALL FUYASU ; FUYASUへ分岐する | |
JP MAIN ; 新しい長さおよび高さで鳴らす | |
;WAITサブルーチン | |
WAIT: CPD ; 待ち時間(音の高さ)を減らす | |
JP PE,WAIT ; 待ち時間(音の高さ)が0になるまでWAITを繰り返す | |
RET ; 0になると、サブルーチンから戻る |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ORG 8000H ; プログラム開始番地 | |
LD A, 0A000H ; 入力値をAレジスタに転送 | |
ADD A,8000H ; Aレジスタの内容に80Hを加算 | |
SRA A ; Aレジスタを算術右シフト演算 | |
SLA A ; Aレジスタを算術左シフト演算 | |
SCF ; キャリーの補数を1にする | |
ADC A,07H ; Aレジスタに07Hおよびキャリーフラグの値を加算 | |
AND 00F0H ; Aレジスタを00F0Hとの AND論理積 | |
SET 7,A ; Aレジスタのビット7を1にする | |
RES 1,A ; Aレジスタのビット1を0にする |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
execute pathogen#infect() | |
syntax on | |
filetype plugin indent on | |
set nocompatible " Be iMproved | |
set tabstop=2 | |
set expandtab | |
set softtabstop=2 | |
set shiftwidth=2 | |
set smarttab |
OlderNewer