Skip to content

Instantly share code, notes, and snippets.

View onocom's full-sized avatar

Ono Takashi onocom

View GitHub Profile
@onocom
onocom / register.php
Last active July 4, 2016 09:25
concrete5のユーザ登録時にmauticにもユーザを追加する際のソースコード
<?php defined('C5_EXECUTE') or die("Access Denied.");
$token = \Core::make('Concrete\Core\Validation\CSRF\Token');
?>
<div class="row">
<div class="col-sm-10 col-sm-offset-1">
<div class="page-header">
<h1><?php echo t('Site Registration')?></h1>
<p>Mauticとの連携を試みます!</p>
</div>
wp plugin deactivate hello
wp plugin uninstall hello
wp plugin install contact-form-7 --activate
wp plugin install advanced-custom-fields --activate
wp plugin install wp-multibyte-patch --activate
@onocom
onocom / CPI-WPCLI-PHP5516-batch.sh
Last active July 11, 2016 07:12
CPIのレンタルサーバにWPCLIをインストールする
# http://www.cpi.ad.jp/evangelist/maekawa/column01/001.html
cd ~
mkdir bin
cd bin/
curl -O https://raw.githubusercontent.com/wp-cli/builds/gh-pages/phar/wp-cli.phar
cd ~
echo alias wp 'php-5.5.16 ~/bin/wp-cli.phar' > .cshrc
source .cshrc
wp --info
cd ~/html
@onocom
onocom / responsive.css
Created June 27, 2016 02:13
responsive for bootstrap
@charset "UTF-8";
/**
* responsive.css
*/
/**
* [lg]LARGE DEVICE Desktop
*/
@media (min-width: 1200px) {
USE データベース名
SOURCE ファイル名
//https://developers.google.com/maps/articles/phpsqlsearch_v3#outputting-xml-with-php
// Search the rows in the markers table
$query = sprintf("SELECT address, name, lat, lng, ( 3959 * acos( cos( radians('%s') ) * cos( radians( lat ) ) * cos( radians( lng ) - radians('%s') ) + sin( radians('%s') ) * sin( radians( lat ) ) ) ) AS distance FROM markers HAVING distance < '%s' ORDER BY distance LIMIT 0 , 20",
mysql_real_escape_string($center_lat),
mysql_real_escape_string($center_lng),
mysql_real_escape_string($center_lat),
mysql_real_escape_string($radius));
$result = mysql_query($query);
@onocom
onocom / form_validation_lang.php
Last active February 10, 2016 08:24
CodeIgniter 3.0のバリデーションメッセージ日本語ファイル(間違いがあれば教えてくださいm(_ _)m)
<?php
/**
* CodeIgniter
*
* An open source application development framework for PHP
*
* This content is released under the MIT License (MIT)
*
* Copyright (c) 2014 - 2016, British Columbia Institute of Technology
*
<?php
add_filter( 'is_lightning_extend_loop', 'oc_is_extend_loop');
function oc_is_extend_loop() {
return true;
}
add_action( 'lightning_extend_loop', 'oc_extend_loop');
function oc_extend_loop() {
// loop
}
@onocom
onocom / ref-spam-list.txt
Created January 12, 2016 05:16
アクセス解析リファラスパムアドレス一覧
// 対応方法: http://analyze.siraberu.info/post-732/
с.новым.годом.рф
share-buttons.xyz
traffic2cash.xyz
website-stealer.nufaq.com
website-stealer-warning.hdmoviecamera.net
w3javascript.com
build-a-better-business.2your.site
topseoservices.co
http://matome.naver.jp/odai/2136491451473222801
http://www.slideshare.net/kotas/git-15276118
http://www.slideshare.net/matsukaz/git-28304397