Skip to content

Instantly share code, notes, and snippets.

View tsmsogn's full-sized avatar
:octocat:
Set your status

tsmsogn tsmsogn

:octocat:
Set your status
View GitHub Profile
@tsmsogn
tsmsogn / kana2upper.js.gs
Created June 25, 2018 04:32 — forked from sa-nitawaki/kana2upper.js.gs
google spreadsheet で半角カナを全角カナにする関数 kana2upper() を作成
/*
How to use:
1)Create new file.
2)
*/
function kana2upper(string) {
web:
image: occitech/cakephp:5-apache
ports:
- 80
links:
- db
- mail
volumes:
- .:/var/www/html
environment:
@tsmsogn
tsmsogn / gist:e1e1c406e2f50ddf7876678ab38540fe
Created December 9, 2016 02:38 — forked from technoweenie/gist:1072829
.netrc file so you can push/pull to https git repos without entering your creds all the time
machine github.com
login technoweenie
password SECRET
machine api.github.com
login technoweenie
password SECRET
@tsmsogn
tsmsogn / vagrant_coreos_docker.md
Created February 19, 2016 10:07 — forked from yasushiyy/vagrant_coreos_docker.md
Vagrant + CoreOS + Dockerを利用した開発環境セットアップ

Vagrant + CoreOS + Dockerを利用した開発環境セットアップ

MacOSX + Vagrant + CoreOS + Docker + Ubuntuの環境。

2014年6月11日時点での情報。

  • Version: CoreOS 343.0.0
  • Kernel: 3.14.5
  • Docker: 1.0
@tsmsogn
tsmsogn / Cartesian.php
Created February 17, 2016 00:47 — forked from jwage/Cartesian.php
PHP Cartesian Function
<?php
$attributeValues = array(
'color' => array('Red', 'White', 'Blue'),
'size' => array(1, 2, 3, 4),
'fabric' => array('Cloth', 'Silk')
);
class Cartesian
{
/* Stack-based Douglas Peucker line simplification routine
returned is a reduced GLatLng array
After code by Dr. Gary J. Robinson,
Environmental Systems Science Centre,
University of Reading, Reading, UK
*/
function GDouglasPeucker (source, kink)
/* source[] Input coordinates in GLatLngs */
/* kink in metres, kinks above this depth kept */
<?php
// Use in the "Post-Receive URLs" section of your GitHub repo.
if ( $_POST['payload'] ) {
shell_exec( 'cd /srv/www/git-repo/ && git pull' );
}
?>hi

git初心者への道

まずやってみよう - コミットする、ログを見る、差分を見る

初登場するコマンド: init, add, commit, log, config, status, diff

<?php
//For PHP 5.3.x or later
public function emailExtended($data, $deep = false) {
$pattern = '/.+@(docomo|ezweb)\.ne\.jp$/i';
$check = preg_replace_callback($pattern, function($matches) {
$patterns = array('/\.{2,}/', '/\.@/');
$replacements = array('.', '@');
return preg_replace($patterns, $replacements, $matches[0]);
}, array_shift($data));
return Validation::email($check, $deep);

#なんだかんだ

##えーと1 どういうこういう そういうどういう

##えーと2 どういうこういう そういうどういう