giniland-blog
giniland-blog
Giniland
216 posts
strive for dreams
Don't wanna be here? Send us removal request.
giniland-blog · 6 years ago
Text
ノート 背景動画 html5のvideoタグでフルースクリーン動画背景
html [html] <video class="position-fixed" src="./beach.mp4" autoplay loop></video> body [/html]
css [css] body { margin: 0; }
video { position: fixed; right: 0; bottom: 0; min-width: 100%; min-height: 100%; width: auto; height: auto; z-index: 1; }
View On WordPress
0 notes
giniland-blog · 6 years ago
Text
nuxt pwa化作業ノート
PWA module : https://pwa.nuxtjs.org/setup 1.Install npm package 2.Edit nuxt.config.js 3.run generate Read the full article
0 notes
giniland-blog · 6 years ago
Text
nuxt pwa化作業ノート
PWA module : https://pwa.nuxtjs.org/setup 1.Install npm package [bash] npm install –save-dev @nuxtjs/pwa [/bash] 2.Edit nuxt.config.js [bash] modules: [ ‘@nuxtjs/axios’, ‘bootstrap-vue/nuxt’, ‘@nuxtjs/pwa’ ], manifest: { name: ‘APP’, short_name: ‘APP’, start_url: ‘/’, display: ‘standalone’, background_color: ‘#fff’, description: ‘A APP’, icons: [{ src:…
View On WordPress
0 notes
giniland-blog · 6 years ago
Text
nuxt headオ���ジェクトと関数の違い
オブジェクトと関数両方対応していますが、違いはthis使えるかどうか? [js] export default { data() { return { title: ‘The Title’ } }, head() { return { title: this.title, meta: [ { hid: ‘description’, name: ‘description’, content: ‘My custom description’ } ] } } } [/js]
titleにthis.title代入でエラーになる [js] export default { dat…
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
windows xampp mysqlテーブル名大文字できない対応
windowsの場合mysqlテーブル名がデフォルト小文字になっており、少し不便 my.iniに一行追加することで解決できます。
下記コード
lower_case_table_names = 2
参考用sample
# Example MySQL config file for small systems. # # This is for a system with little memory (
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
laravel5.7 model sample
insert
insert_batch
get
[php] <?php
namespace App;
use Illuminate\Database\Eloquent\Model; use Illuminate\Support\Facades\DB;
class DetailModel extends Model { protected $table = ‘daily_detail’; protected $query;
public function __construct() { $this->query = DB::table($this->table); }
public function get($where = null) { if ($where) { $this->query->wher…
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
centOS6のapacheにSSL letsencrypt認証
centOsバージョン確認
[bash] cat /etc/redhat-release [/bash]
update curl
[bash] yum update curl [/bash]
rootからやる
[bash] cd / [/bash]
git letsencrypt
[bash] git clone https://github.com/letsencrypt/letsencrypt [/bash]
letsencryptへ移動
[bash] cd letsencrypt [/bash]
apache停止
[bash] service httpd stop [/bash] ※停止しないと後ほどエラーになる可能性がある
xxxxxxxxx.comをドメイン名に変更
[bash] ./letsencrypt-auto certonly -a standalone -d…
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
laravel5.7のcontrollerでユーザー認証情報name,emailなど使う
Laravel5.7公式ドキュメント参照
方法1
[php] $user = \Auth::user(); echo ‘<ul>’; echo ‘<li>’.$user->id.'</li>’; echo ‘<li>’.$user->name.'</li>’; echo ‘<li>’.$user->email.'</li>’; print_r(‘<li>’.$user.'</li>’); echo ‘</ul>’; exit; [/php]
方法2
use Illuminate\Support\Facades\Auth必要 [php] use Illuminate\Support\Facades\Auth;
// 現在認証されているユーザーの取得 $user = Auth::user();
/…
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
vscodeのconfig設定
vscodeのconfig設定 [bash] { "editor.formatOnPaste": true, "editor.formatOnSave": true, "editor.formatOnType": true, "editor.renderLineHighlight": "all", "files.autoGuessEncoding": true, "git.ignoreMissingGitWarning": true, "workbench.startupEditor": "newUntitledFile", "gitlens.advanced.messages": { "suppressShowKeyBindingsNotice": true }, "gitlens.gitExplor…
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
checkbox css デザイン
SAMPLE
#LABEL
HTML
[html] <label> <input class="checkbox" type="checkbox" name="checkbox[]" data-id="####"> <span class="checkbox-label">#LABEL</span> </label> [/html]
CSS
[css]
/* css checkbox */ .checkbox{ display: none; } .checkbox-label{ padding-left: 20px; position:relative; margin-right: 20px; } .checkbox-label::before{ content: ""; display: block; position:…
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
javascript jqueryでinput制御
[js] $(‘.string’).change(function(){ var text = $(this).val(); var ngchr = [ ‘①’,’②’,’③’,’④’,’⑤’,’⑥’,’⑦’,’⑧’,’⑨’,’⑩’,’⑪’,’⑫’,’⑬’,’⑭’,’⑮’, ‘⑯’,’⑰’,’⑱’,’⑲’,’⑳’,’Ⅰ’,’Ⅱ’,’Ⅲ’,’Ⅳ’,’Ⅴ’,’Ⅵ’,’Ⅶ’,’Ⅷ’,’Ⅸ’,’Ⅹ’, ‘㍉’,’㌔’,’㌢’,’㍍’,’㌘’,’㌧’,’㌃’,’㌶’,’㍑’,’㍗’,’㌍’,’㌦’,’㌣’,’㌫’,’㍊’,’㌻’, ‘㎜’,’㎝’,’㎞’,’㎎’,’㎏’,’㏄’,’㎡’,’㍻’, ‘〝’,’〟’,’№’,’㏍’,’℡’,’㊤’,’㊥’,’㊦’,’㊧’,’㊨’,’㈱’,’㈲’,’㈹’,’㍾’,’㍽’,’㍼’,
View On WordPress
1 note · View note
giniland-blog · 7 years ago
Text
codeigniter3 簡易API
[php] <?php defined(‘BASEPATH’) OR exit(‘No direct script access allowed’); class Api extends CI_Controller{
public function checkmail(){ if( !empty($this->input->post(’email’)) ):
$this->load->model(‘user_model’); if( $this->user_model->checkMail($this->input->post(’email’)) ){ echo TRUE;exit; }
endif; echo FALSE; }
} [/php]
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
codeigniter3 Mypage controller construct設定
codeigniter3 Mypage controller construct設定
php7なら演算子??で省略できるけど [php] <?php defined(‘BASEPATH’) OR exit(‘No direct script access allowed’);
class Mypage extends MY_Controller { private $post = ”; private $get = ”;
public function __construct(){ parent::__construct(); if(!empty($this->input->post())){@$this->post = $this->input->post();} if(!empty($this->input->get())){@$this->get = $this->input->get();} if(empty($this->session->is_…
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
codeigniter3 MY_Controller twig 設定
codeigniter3 MY_Controller twig 設定
Debug
$this->output->enable_profiler(‘TRUE’);
twigキャッシュ
$this->twig = new Twig_Environment($loader, array(‘cache’ => APPPATH.’/cache/twig’, ‘debug’ => true)); [php] <?php class MY_Controller extends CI_Controller { protected $twig;
public function __construct(){ parent::__construct();
$loader = new Twig_Loader_Filesystem(‘./application/views’); // $this->twig = new…
View On WordPress
1 note · View note
giniland-blog · 7 years ago
Text
jquery3.3.1 ajax postサンプル
jquery3.3.1 ajax postサンプル [javascript] $(‘#email’).change(function(){ var email = $(this).val();
$.post( "/store/smartbookstore/api/checkmail", { email: email }) .done(function( data ) { if(data){ $(‘#email’).val(”); swal("メールアドレス使用不可",email + " はすでに使用されています。","warning"); } });
}); [/javascript]
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
Laravel初期設定からユーザー認証まで
[bash] php new laravel
cd laravel
.env [/bash]
laravel\.env編集
[php] DB_CONNECTION=mysql DB_HOST=127.0.0.1 DB_PORT=3306 DB_DATABASE=laravel DB_USERNAME=root DB_PASSWORD= [/php]
config\database.php編集
変更箇所 charset collation [php] ‘mysql’ => [ ‘driver’ => ‘mysql’, ‘host’ => env(‘DB_HOST’, ‘127.0.0.1’), ‘port’ => env(‘DB_PORT’, ‘3306’),
View On WordPress
0 notes
giniland-blog · 7 years ago
Text
自分用codeigniter model base カスタマイズ
※Xxx修正する必要がある [php] <?php defined(‘BASEPATH’) OR exit(‘No direct script access allowed’);
class Xxx_model extends CI_Model { private $table = ‘Xxx’;
public function __construct(){ parent::__construct(); }
public function get($select,$where = []){ $this->db->select($select) ->from($this->table);
if( !empty($where) ){ $this->db->where($where); } $query = $this->db->get();
ret…
View On WordPress
1 note · View note