Skip to content

Instantly share code, notes, and snippets.

View devlights's full-sized avatar
🤧
hay fever....

devlights devlights

🤧
hay fever....
View GitHub Profile
@devlights
devlights / excel2pdf.go
Created September 11, 2023 10:02
Excel to PDF
package main
import (
"flag"
"fmt"
"log/slog"
"os"
"path/filepath"
"strings"
@devlights
devlights / word2pdf.go
Created September 11, 2023 10:01
Word to PDF
package main
import (
"flag"
"fmt"
"log/slog"
"os"
"path/filepath"
"strings"
@devlights
devlights / install-google-chrome-on-linux(wsl).md
Last active September 6, 2023 04:35
Linux (WSL) に Google Chrome をインストール

Linux (WSL) に Google Chrome をインストール

debファイルを取得し、インストールを試みる。

$ wget https://dl.google.com/linux/direct/google-chrome-stable_current_amd64.deb
$ sudo dpkg -i google-chrome-stable_current_amd64.deb
(Reading database ... 30014 files and directories currently installed.)
Preparing to unpack google-chrome-stable_current_amd64.deb ...
Unpacking google-chrome-stable (116.0.5845.140-1) over (116.0.5845.140-1) ...
@devlights
devlights / README.md
Last active September 3, 2023 09:18
C言語おさらい(自分用)

Run

$ gcc -o app main.c
$ ./app
16975631        16975631        1807    15
15
7
3
1
@devlights
devlights / howto_use_scoop.md
Created August 29, 2023 08:01
Scoop 使い方まとめ

Scoop の使い方まとめ

インストール

$ scoop install xxxxx

アンインストール

@devlights
devlights / README.md
Last active August 23, 2023 08:04
バイトスライスに文字列を速く設定する方法(fmt.Sprintf, fmt.Appendf, 直接append使用)
@devlights
devlights / README.md
Last active July 22, 2023 16:07
ChromebookのLinuxにFlutterをインストール (ARM版) (結局Androidの設定はうまくいかず・・・)

Google Chrome は、ARM版を配布していないので、Chromiumで代用。

$ uname -m
aarch64

$ cd $HOME

$ sudo apt install clang cmake ninja-build pkg-config libgtk-3-dev build-essential chromium
$ git clone https://github.com/flutter/flutter.git -b stable
@devlights
devlights / hello-apple.md
Created July 1, 2022 10:03 — forked from Linrstudio/hello-apple.md
solutions for window.innerWidth / innerHeight issue in iOS9

iOS9 returns double the value for window.innerWidth & window.innerHeight
The versions that are concerned are: 9.0.0, 9.0.1, 9.0.2

A few people got mad on twitter:

window.innerWidth in iOS 9 Safari returns double the number it did in iOS 8? Is this real life? tell me no — @rachsmithtweets
iOS9 Safari has the most insane bug where window.innerWidth / innerHeight is *sometimes* twice as large as it should be. ughhhh. !? — @mattdesl

iOS9 innerWidth/innerHeight is having a lot of fun these days — @ayamflow

@devlights
devlights / kata.cs
Last active March 3, 2022 08:19
自分用 手慣らしの型 (go, csharp)
//
// 自分用の手慣らしの型
// 1.HttpClientでリクエストを出す(リクエストもそれぞれを非同期実行)
// 2.(1)の結果から <title> タグの中身を抽出
// 3.(2)の結果を出力
//
// エラー処理は面倒なので割愛している
//
// httpリクエストを非同期実行しているので
// 結果は毎回異なる可能性がある。
@devlights
devlights / Microsoft.PowerShell_profile.ps1
Last active February 8, 2022 04:52
PowerShell Profile
# ---------------------------------------------------
# Set encodings
# ---------------------------------------------------
[System.Console]::OutputEncoding = [System.Text.Encoding]::GetEncoding("utf-8")
[System.Console]::InputEncoding = [System.Text.Encoding]::GetEncoding("utf-8")
$env:LESSCHARSET = "utf-8"
# ---------------------------------------------------
# Import plugins
# - Enabling it slows down the startup time, so I've disabled it for now.