技術情報
- 2021年11月29日
- 技術情報
Deleting .env file back from Git
Sometimes , we accidentally pushed a file with some username , password or secret tokens etc. It has a variety security concerns for your project and this should be removed back from Git.
Git ignore
First thing you need to do is to add the file you don’t want to push to git at .gitignore file. Add it in .gitignore , commit and push it.
# Secret file
.env
But this will not change any effects to .env as the file is already pushed before and .gitignore doesn’t untracked the already committed changes
Deleting the file
So we have to remove the specific file , .env in our case from the git remote repo entirely. We can use the following command.
git rm -r --cached .env
If we push the changes , the .env file will be remove from the remote repository
Git History
However, one more thing is left which is git histories. We can check the .env file contents also in git histories. So we need to remove the specific git history as well to hide the .env contents.
To remove the file altogether, we can use like following.
git filter-branch --index-filter "git rm -rf --cached --ignore-unmatch .env" HEAD
When you push this time, you have to use –force option.
git push --force
If we look at our history, we can still see the commits that include .env file but the content is empty.
That’s all for now.
Yuuma
yuuma at 2021年11月29日 10:00:00
- 2021年11月26日
- 技術情報
JavaScript HandSonTable Renderer Memo

I would like to share about how to renderer as your desire cells when you use HandSonTable. HandSonTable can’t directly insert html elements into cells. But after declaration renderer:html in our table of cell, we can use html elements as your desire. Second ways is to create custom renderer in cells properties with our own way.
Firstly we will create simple html file. In this file we will import handsontable.min.js and handsontable.min.css. We can get these file script from this site cdnjs.com.
<script src="https://cdn.jsdelivr.net/npm/handsontable@11.0/dist/handsontable.full.min.js"></script>
<link type="text/css" rel="stylesheet" href="https://cdn.jsdelivr.net/npm/handsontable@11.0/dist/handsontable.full.min.css" />
To insert our table, create a div with id attribute and call this id with JS querySelector.
<div id="example1" class="hot "></div>
const container = document.querySelector('#example1');
Usage of HandSonTable
const hot = new Handsontable(container, {
data : data
});
const data = [
{ id: 1, name: 'Suga', isActive: true, date: '2021-11-25' },
{ id: 2, name: 'Jimin', isActive: false, date: null },
{ id: 3, name: 'JHope', isActive: true, date: null },
{ id: 4, name: 'V', isActive: false, date: null },
];
If you want to add colsHeader, set to true => colHeaders : true
And if you want to add strict cell type and render columns, we can set inside columns.
columns: [
{ data: 'id', type: 'text' },
// 'text' is default, you don't actually need to declare it
{ data: 'name', renderer: yellowRenderer },
// use default 'text' cell type but overwrite its renderer with yellowRenderer
{ data: 'isActive', type: 'checkbox' },
{ data: 'date', type: 'date', dateFormat: 'YYYY-MM-DD' },
],
I will add another custom renderer named with greenRenderer but this greenRenderer will not add all the cell, just add some row. So I will use this greenRenderer inside a cell.
cells(row, col, prop) {
if (row === 3 && col === 0) {
this.renderer = greenRenderer;
}
}
yellowRenderer function => this function will add all the cell with background color yellow.
const yellowRenderer = function(instance, td, row, col, prop, value, cellProperties) {
Handsontable.renderers.TextRenderer.apply(this, arguments);
td.style.backgroundColor = 'organe';
};
greenRenderer function => this function will add some of cell with background color red.
const greenRenderer = function(instance, td, row, col, prop, value, cellProperties) {
Handsontable.renderers.TextRenderer.apply(this, arguments);
td.style.backgroundColor = 'purple';
};
If you want to set custom colWidths , then set colWidths to your desire value.
colWidths : 100
Hope you enjoyed about this article!
By Ami
asahi at 2021年11月26日 10:00:00
- 2021年11月24日
- 技術情報
Django & Laravel
Today I would like to share about advantages and disadvantages between Django and Laravel framework. First of all, as we know, each framework has each property and market. So this article just describes about the pros and cons.
What is Django?
Django is a web framework operating with Python programming language. Django is more suitable for implementing such technologies as AI(Artificial Intelligence) and ML(Machine Learning). Django follows the MVT(model view template) architectural pattern. It is adaptable to almost any project in various industries and includes various ready-made feature packages.
What is Laravel?
Laravel is a web framework that runs on PHP and maintains the MVC (model view controller) architectural pattern. It involves lots of additional libraries that make the development process more simple and supports the object-oriented approach. Laravel is supported by comprehensive documentation and detailed tutorials.
Advantages of Django
- is easily adjustable to any project;
- scalability;
- SEO tools included;
- quick prototype creating;
- generous dev community support and extensive documentation;
- easy data management
Disadvantages of Django
- Knowledge of full system is required to work
- creating API by yourself
- not very suitable for small projects
- Uses routing pattern specify its URL
Advantages of Laravel
- fast development
- clean and user-friendly architecture
- growing developer community
- a built-in command-line Artisan
- large cloud storage for files
- an easy way to build API
- ability to operate on numerous file systems simultaneously
Disadvantages of Laravel
- the syntax is difficult for beginners
- having to deal with standards
- no shared hosting support included
- unnecessary queries on databases
That is all for now. Hope you enjoy it.
By Asahi
waithaw at 2021年11月24日 10:00:00
- 2021年11月19日
- 技術情報
Let’s create flutter UI without wasting too much time!

This time I would like to share about to create flutter design in mobile apps easily and quickly drag and drop. This name is flutter flow site that I found out.
Let’s take a look the site!
Firstly, we will create free account and after creation complete, we will see this page.

In the left side activity bar, we will see all of widgets, layouts, most popular form design etc. that you want to desire creation.
After running project or without running project, you can get your creation design code.And also if you want to get apk that also available. The below image is my creation of flutter code simple.

Hope you enjoyed my sharing article!
By Ami
asahi at 2021年11月19日 10:00:00
- 2021年11月18日
- 技術情報
LaravelでPDF出力処理を作成する
今回はLaravelでPDF出力をおこなうためのライブラリ「laravel-dompdf」の導入方法と
使用方法について紹介したいと思います。
必要なファイルのインストール
laravel-dompdf
https://github.com/barryvdh/laravel-dompdf
プロジェクトのルートディレクトリに移動をおこない
以下のコマンドを実行します。
composer require barryvdh/laravel-dompdf
※この操作をおこなうためにはcomposer 2のインストールが必要です。

コントローラー側の出力処理
PDFのレイアウトはbladeテンプレートのViewを作成するのと同じ要領でhtml/cssを使用して作成できます。
以下のようにテンプレートのViewを指定します。
$pdf = \PDF::loadView('pdf_template');
生成されたPDFをダウンロードさせるには以下の記述をおこないます。
以下の場合、ファイル名が「generated_pdf.pdf」のPDFファイルがダウンロードされます。
return $pdf->download('generated_pdf.pdf');
viewの準備
htmlのbladeテンプレートViewと同様に以下の階層にbladeテンプレートを作成します。\src\resources\views\pdf_template.blade.php
ページレイアウトはhtml/cssを使用して作成します。
PDFの改ページにはcssの page-break-after: always が使用できます。
<style>
hr {
page-break-after: always;
}
</style>
PDFに日本語を表示する
標準の状態では日本語の表示に対応していませんので、
日本語用フォントを手動でインストールする必要があります。
今回はオープンソースの日本語フォント「IPAexフォント」を使用する方法を説明します。
IPAexフォントおよびIPAフォントについて
https://moji.or.jp/ipafont/
IPAexフォントは以下よりダウンロード可能です。
https://moji.or.jp/ipafont/ipafontdownload/
上記URLからダウンロードしたフォントファイル「ipag.ttf」を以下に配置します。
\src\storage\fonts\ipag.ttf
viewでは以下のように記述してフォント指定をおこないます。
<style>
@font-face {
font-family: ipag;
font-style: normal;
font-weight: normal;
src: url('{{ storage_path('fonts/ipag.ttf') }}') format('truetype');
}
@font-face {
font-family: ipag;
font-style: bold;
font-weight: bold;
src: url('{{ storage_path('fonts/ipag.ttf') }}') format('truetype');
}
</style>
木曜日担当:nishida
nishida at 2021年11月18日 10:00:00