Skip to content

Instantly share code, notes, and snippets.

@subebe
subebe / installer.bat
Last active August 29, 2015 14:22
dotfiles初期設定
@echo OFF
git clone https://github.com/subebe/dotfiles %USERPROFILE%\\dotfiles
mkdir %USERPROFILE%\\dotfiles\\.vim\\backup
mkdir %USERPROFILE%\\dotfiles\\.vim\\bundle
mkdir %USERPROFILE%\\dotfiles\\.vim\\cache
mkdir %USERPROFILE%\\dotfiles\\.vim\\swap
mkdir %USERPROFILE%\\dotfiles\\.vim\\undo
git clone https://github.com/Shougo/neobundle.vim %USERPROFILE%\\dotfiles\\.vim\\bundle\\neobundle.vim
@subebe
subebe / csv.php
Created May 23, 2015 06:50
csv読み書き
<?php
ini_set('display_errors',1);
error_reporting(E_ALL);
$filepath = __DIR__ . '/data.csv';
$handle = fopen($filepath, "a+");
if ($handle !== false) {
if(isset($_POST['data']) && $_POST['data'] !== ''){
@subebe
subebe / backup.bat
Last active August 29, 2015 14:14
windowsのsendtoに置いて使用する用。yyyymmdd[a-z]_<filename>の形式でバックアップを取るスクリプト。最初からバッチで組めばよかったよ
@echo off
setlocal
set n=%date:~-10,4%%date:~-5,2%%date:~-2,2%%%a_%~nx1
for %%a in (a b c d e f g h i j k l m n o p q s r t u v w x y z) do (
if not exist %n% (
if exist %~nx1\ (
xcopy /e %~nx1 %n%\
) else (
copy %~nx1 %n%
)