Skip to content

Instantly share code, notes, and snippets.

@7cc
7cc / aニコニコ静画-マンガAPI-01.txt
Last active January 30, 2024 14:43
ニコニコ静画、マンガAPI
*良識の範囲で使う。例えば、関連する市場も同時に表示するとか
追記:市場は終了…https://blog.nicovideo.jp/seiga/2019/12/post-1285.html
# 静画API
静画, コメント, タグ, 市場
マンガ, コメント, タグ, 市場(旧テーマ?お題)
自分のNGリスト取得
マイリスト取得?不明
ランキング
@7cc
7cc / importFromGist.js
Created September 11, 2019 21:48
js import from Gist
async function importFromGist(gistURL) {
var scriptText = await fetch(gistURL).then(res=> res.text())
var blob = new Blob([scriptText], {
type: "application/javascript"
})
var url = URL.createObjectURL(blob)
return await import(url)
}
@7cc
7cc / powershell_functions.ps1
Last active June 19, 2020 13:12
powershell functions
# Function
function F {}
F
# ScriptBlock
& ({})
({}).Invoke()
@7cc
7cc / gist:ff780b865e2103b44d49ca308e808f95
Created June 12, 2020 23:31
ChromeのSoftware Reporter Toolを無効化
  1. グループポリシーの変更(Home不可)
  2. アクセス制御
  3. ファイル書き換え

http://fireflyframer.blog.jp/21679827.html

rmdir /s /q "%LocalAppdata%\Google\Chrome\User Data\SwReporter\"
type nul > "%LocalAppdata%\Google\Chrome\User Data\SwReporter"
@7cc
7cc / ScriptBlock_InvokeWithContext.ps1
Created June 11, 2020 21:33
ScriptBlock_InvokeWithContext.ps1
$s = { param($a) $a+$b }
# success
$s.InvokeWithContext(
$null,
[psvariable[]]@([psvariable]::new("b", 3)),
2
) # 5
# fail
@7cc
7cc / demo.html
Last active March 18, 2020 19:53
multi-border-color.css
<iframe srcdoc="
<!doctype html>
<style>
.multi-border-color {
border-style: solid;
border-image-source: linear-gradient(to right, crimson 15%, #ddd 15% 100%);
border-image-width: 0px 0px 10px 0px;
border-width: 0px 0px 10px 0px;
border-image-slice: 1;
}

Visual Studio なしであれがしたい

C#6以降をコンパイルしたい

どれか一つ

  • .NET Core SDK をインストール
  • Microsoft.Net.Compilers をダウンロード
  • Build Tools for Visual Studio 2019 をインストール
変数 WindowsPowerShell Core
$PSVersionTable.PSVersion 5.1.18362.628 6.2.4
$PSVersionTable.PSEdition Desktop Core
$PSVersionTable.OS Microsoft Windows 10.0.18363
$PSVersionTable.Platform Win32NT
$Host.Version 5.1.18362.628 6.2.4
$PSEdition Desktop Core
@7cc
7cc / dotnet_publish.txt
Created March 2, 2020 05:16
dotnet publish
dotnet publish
-c Release Release/Debug
-r win10-x64 特定のプラットフォームをターゲットにするか・しないか
--self-contained false 実行にランタイムのインストールがいるか・いらないか
/p:PublishSingleFile=true 実行ファイルを一つにするか・しないか
/p:PublishTrimmed=true 実行ファイルを小さくするか・しないか
/p:PublishReadyToRun=true AOTコンパイルするか, ngenほどの効果はない, サイズには関係ない
Unixで実行ファイルを小さくするために"グローバリゼーション インバリアント モード" を使用するか
-30MBくらい小さくなる。.csprojに直接記述する。
@7cc
7cc / amdapfxx.txt
Created February 24, 2020 07:27
amd switchable graphics, amdapfxx.exe
amdapfxx [-k] [-s filename] [-p pathname] [-v version number] [-r] -b filename
-k To sign or resign the AMD binary file
- Optionally use -o to specify binary name
-s filename of the XML content
- Can be used with -p -k and -o
- Use this parameter multiple times to merge XML Files.
- Use this parameter exactly once if -r is specified.
-b filename of the file to contain the Binary content.
- Required in all cases except system/oem binary to xml conversion.
-l filename of the progress log.