Skip to content

Instantly share code, notes, and snippets.

import sys
import numpy as np
def numPrint(num):
print("numprint:" + str(num))
if __name__ == '__main__':
args = sys.argv
View gist:f8337a0b6644e0031df5a73e62a84e07
$tags = get_the_tags();
if ( !empty( $tags ) ) {
fontawsomeのタグを構成し、出力する */
echo '<div><i class="' . $tags[0]->description . '"></i><div>' . $tags[0]->name . '</div></div>';
View resources-views-myfirstpage.blade.php
<!doctype html>
<html class="no-js" lang="">
<meta charset="utf-8">
<meta http-equiv="x-ua-compatible" content="ie=edge">
<!-- <meta name="description" content=""> -->
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<!-- <link rel="manifest" href="site.webmanifest"> -->
<!-- <link rel="apple-touch-icon" href="icon.png"> -->
View app-models-myfirstModel.php
namespace App\models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Facades\DB;
class mysqlModel extends Model
public function getUsers()
View myfirstcontroller-Controllers-myfirstController.php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class myfirstController extends Controller
public function index()
//user php function
$user_agent = $_SERVER['HTTP_USER_AGENT'];
$user_ip = $_SERVER['REMOTE_ADDR'];
hashihei / myfirstcontroller-routes-web.php
Last active May 26, 2019
View myfirstcontroller-routes-web.php
Route::get('/', function () {
return view('welcome');
Route::get('myfirstpage', 'myfirstController@index');