Skip to content

Instantly share code, notes, and snippets.

View hagevvashi's full-sized avatar

ハゲワシ hagevvashi

  • Kakaku.com, Inc.
View GitHub Profile
@hagevvashi
hagevvashi / renovate-sample.json
Created December 9, 2021 23:05
renovate-sample.json
{
"automerge": true,
"packageRules": [
{
"groupName": "husky",
"matchPackagePatterns": ["husky"],
"labels": ["renovate", "automerge:false"],
"rebaseWhen": "conflicted",
"automerge": false
}
@hagevvashi
hagevvashi / enable-wpasupplicant.md
Last active January 22, 2023 13:34
ubuntu server で wifi 動かすまで

インストールした順番

  1. libpcsclite1_1.9.1-1_amd64.deb

  2. libnl-3-200_3.4.0-1+b1_amd64.deb

  3. libnl-route-3-200_3.4.0-1+b1_amd64.deb

  4. wpasupplicant_2.9.0-21_amd64.deb

@hagevvashi
hagevvashi / gist:2dbe0388164c8837a69e881397f9f685
Last active March 7, 2021 13:31
Virtualbox 上の ubuntu server に USB デバイスを認識させる

やったこと

Extension Pack を導入

https://www.virtualbox.org/wiki/Downloads

VirtualBox 6.1.18 Oracle VM VirtualBox Extension Pack
 All supported platforms
Support for USB 2.0 and USB 3.0 devices, VirtualBox RDP, disk encryption, NVMe and PXE boot for Intel cards. See this chapter from the User Manual for an introduction to this Extension Pack. The Extension Pack binaries are released under the VirtualBox Personal Use and Evaluation License (PUEL). Please install the same version extension pack as your installed version of VirtualBox.
{
"name": "babel-loader",
"target": "web",
"supportsStaticESM": true,
"supportsDynamicImport": true,
"supportsTopLevelAwait": true
}
module.exports = (api) => {
const isWeb = api.caller((caller) => {
if (caller) {
return caller.target === "web";
}
});
const isDevelopment = api.env("development");
api.cache(true);
import { Configuration } from "webpack";
const config: Configuration = {
devServer: {
proxy: [
{
context: ["/api/**"],
// VMだったらos.hostname()やos.type()を用いて柔軟に対応する
target: "http://localhost:4000",
pathRewrite: { "^/api": "" },
import React, { FC, ReactElement } from "react";
const HelloPage: FC = () => (
<>
<section>
<h2>ページ一覧</h2>
<section>
<h3>大事なページ</h3>
<ul>
<li>
plugins: [
new HtmlWebpackPlugin({
filename: "./index.html",
template: "src/index.tsx",
chunks: ["index"],
}),
...chunks.map(
([chunk]) =>
new HtmlWebpackPlugin({
filename: `./pages/${chunk}.html`,
import type HtmlWebpackPlugin from "html-webpack-plugin";
import React, { FC, ReactElement } from "react";
import { renderToString } from "react-dom/server";
import { ServerStyleSheet, createGlobalStyle } from "styled-components";
function route(action: string): ReactElement {
switch (action) {
case "page1": {
return <Page1 />;
}
import { Configuration } from "webpack";
import glob from "glob";
import HtmlWebpackPlugin from "html-webpack-plugin";
const entries: string[] = glob.sync(
"src/path/**/*.t+(s|x)"
);
const chunks = entries.map((entry) => [
entry.replace(/^src\/path\//, "").replace(/\.tsx?$/, ""),