Skip to content

Instantly share code, notes, and snippets.

Avatar

Sergei Ogainsbourg ogaaaan

View GitHub Profile
@ogaaaan
ogaaaan / getCorrectedNextMonth.php
Created Aug 1, 2011
1ヶ月後の日付を返す(1ヶ月飛ばさない)
View getCorrectedNextMonth.php
<?php
/**
* getCorrectedNextMonth
*
* 年月日を渡すとその翌月の当日を調整して返す
*
* 2011-01-31を渡すと、2011-02-312011-03-03ではなく
* 翌月内に収まるようにして2011-02-28を返す
* 月額課金をわかり易くするために使う。
*
@ogaaaan
ogaaaan / app.js
Last active Aug 28, 2019
auto resize image
View app.js
/**
* how to use this script
* 1. npm init
* 2. npm i sharp --save
* 3. npm i path --save
* 4. npm i chokidar --save
* 5. node app
*/
const sharp = require('sharp');
const path = require('path');
@ogaaaan
ogaaaan / uunp.xml
Created Dec 25, 2018
hdtDkinnrdMrdhConfigs - UUNP
View uunp.xml
<?xml version="1.0" encoding="utf-8"?>
<system>
<bone name="NPC L PreBreast">
<mass>0.000000</mass>
<inertia x="0" y="0" z="0"/>
<centerOfMassTransform>
<basis x="0" y="0" z="0" w="1"/>
<origin x="0" y="0" z="0"/>
</centerOfMassTransform>
<linearDamping>0</linearDamping>
View ATOM_note.md

ATOM 覚書

テーマ

  • flatland-dark
    • SublimeTextで人気のダークカラー
  • flatland-dark-ui
@ogaaaan
ogaaaan / gulpfile.js
Last active Jan 27, 2016
gulp basic setting
View gulpfile.js
/**
* 汎用Gulpfile
*
* @author Seiji Ogawa [****@****.**.**]
* @copyright ***** 2015
*/
/**
* モジュール読み込み
*/
@ogaaaan
ogaaaan / config.rb
Last active Jan 27, 2016
compass設定ファイル
View config.rb
# Require any additional compass plugins here.
# Set this to the root of your project when deployed:
http_path = "./"
css_dir = "src/css"
sass_dir = "src/sass"
images_dir = "src/img"
javascripts_dir = "src/js"
# fonts_dir = "./src/fonts"
@ogaaaan
ogaaaan / package.json
Last active Jan 27, 2016
npmインストール設定(gulp版)
View package.json
{
"name": "example.com",
"version": "1.0.0",
"description": "test",
"main": "gulpfile.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
"author": "",
"license": "ISC",
@ogaaaan
ogaaaan / Vagrantfile
Last active Jan 27, 2016
Vagrantfile最低限の設定
View Vagrantfile
# -*- mode: ruby -*-
# vi: set ft=ruby :
Vagrant.configure(2) do |config|
# Vagrant box
config.vm.box = "centos67-x86_64"
# Bridged networks
config.vm.network "public_network", ip: "192.168.77.223"
@ogaaaan
ogaaaan / setup.sh
Last active Jan 27, 2016
【WIP】CentOS6.7 x86_64 プロビジョニング用シェル
View setup.sh
LANG=C
# STOP iptables
#
echo -e "\n[ STOP iptables ]\n"
# ipv4
service iptables stop
chkconfig iptables off
# ipv6
service ip6tables stop
View gist:6620021
DROP TABLE IF EXISTS `posts`;
CREATE TABLE IF NOT EXISTS `posts` (
`id` int(5) NOT NULL AUTO_INCREMENT,
`title` varchar(64) NOT NULL COMMENT '件名',
`body` text NOT NULL COMMENT '本文',
`created` datetime NOT NULL,
`modified` datetime NOT NULL,
PRIMARY KEY (`id`),
KEY `title` (`title`,`body`(191))
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 AUTO_INCREMENT=1;