Skip to content

Instantly share code, notes, and snippets.

View YasuakiHirano's full-sized avatar
🎮

yasuaki hirano YasuakiHirano

🎮
View GitHub Profile
@YasuakiHirano
YasuakiHirano / axiosPdfOpen.js
Last active February 17, 2020 02:59
open files pdf with ajax(axios)
axios({
url: 'http://localhost/static/example.pdf',
method: 'GET',
responseType: 'blob',
}).then((response) => {
const file = new Blob([response.data], { type: 'application/pdf' });
const fileURL = URL.createObjectURL(file);
window.open(fileURL, '_target')
});
<?php
class Character
{
public $name;
public $hp;
public $mp;
public function __construct($name, $hp, $mp)
{
$this->name = $name;
$this->hp = $hp;
<?php
require 'vendor/autoload.php';
use Carbon\Carbon;
$dt = new Carbon();
echo $dt."\n";
@YasuakiHirano
YasuakiHirano / guzzle_zipcloud.php
Created May 29, 2019 14:54
test of zipcloud api
<?php
require 'vendor/autoload.php';
use GuzzleHttp\Client;
if ($_POST["mode"] == 'search') {
$client = new Client();
$url = 'http://zipcloud.ibsnet.co.jp/api/search';
$option = [
<html>
<head>
<title>jqueryイベントテスト</title>
<script
src="https://code.jquery.com/jquery-3.4.1.min.js"
integrity="sha256-CSXorXvZcTkaix6Yvo6HppcZGetbYMGWSFlBw8HfCJo="
crossorigin="anonymous"></script>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script>
@YasuakiHirano
YasuakiHirano / list_output_csv.php
Last active May 23, 2019 06:46
csv output lists(php)
<?php
$mode = $_POST["mode"];
// ヘッダ行
$head = ['id', '名前', '説明', '価格'];
// データ行
$data = [
["00001", 'りんご', '12個です', '1,200'],
["00002", 'ぶどう', 'ひとつぶです', '10,200'],
@YasuakiHirano
YasuakiHirano / top_list.blade.php
Created May 11, 2019 17:07
codelike_bbs top screen sample file
<!doctype html>
<html lang="ja">
<head>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css" integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<title>codelike bbs</title>
</head>
<body>
<nav class="navbar navbar-dark bg-dark">
<a class="navbar-brand" href="#">codelike bbs</a>
</nav>
var gulp = require('gulp');
var webserver = require('gulp-webserver');
gulp.task('default', function(){
console.log("start");
});
gulp.task('web', function(){
console.log("start server");
gulp.src('app')
<!DOCTYPE html>
<html lang="ja">
<head>
<meta charset="UTF-8">
<script src="https://code.jquery.com/jquery-3.1.0.min.js"></script>
<title></title>
<style>
#page-top {
position: fixed;
bottom: 20px;
/*--デスクトップサイズ--*/
body {
background:black;
color:#ffffff;
}
#pcSize{
font-size:250%;
display:block;
}