This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# !!!注意!!!: | |
# このスクリプトはCドライブ配下のファイル・フォルダを探索するため「システムに負荷がかかる場合があります」 | |
# 実行は自己責任でお願いします。 | |
# 使い方: | |
# powershell -ExecutionPolicy Bypass -File .\Scan-Bundle.ps1 <start_directory> | |
param( | |
[Parameter(Mandatory = $true)] | |
[string]$TargetDirectory | |
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
document.querySelectorAll('ins iframe').forEach(e => { | |
let p = e.parentElement; | |
while (p.tagName !== 'INS') { | |
p = p.parentElement; | |
} | |
p.remove(); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum LogCategory { | |
Audit | |
Signin | |
} | |
enum Sevirity { | |
High | |
Medium | |
Low | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// npm install @aws-sdk/client-cognito-identity | |
import { | |
AuthenticationDetails, | |
CognitoUserPool, | |
CognitoUserAttribute, | |
CognitoUser, | |
} from 'amazon-cognito-identity-js'; | |
var poolData = { | |
UserPoolId: '', |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# 使用は自己責任で、一切責任は負いません。 | |
# このプログラムは個人の利便性と参考のために公開しています。 | |
# | |
# 参考情報 | |
# https://docs.microsoft.com/en-us/windows/desktop/power/power-policy-settings | |
# https://devblogs.microsoft.com/scripting/use-powershell-to-detect-power-state-and-to-set-power-plan/ | |
$powerOptionMap = @{ | |
Balance = "381b4222-f694-41f0-9685-ff5bb260df2e"; | |
Presentation = "3c0b10d2-7404-4a8a-885f-1791a2c9a075"; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# coding: utf-8 | |
# 動いて目的を達成させればいい程度の雑な気持ちで書いたのでスタイルとかその辺は勘弁 | |
import tweepy | |
twitter_conf = { | |
'consumer' : { | |
'key' : "", | |
'secret' : "" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Ball | |
constructor: -> | |
@radius = 16 | |
@speed = new p5.Vector(1.0, 3.3) | |
@location = new p5.Vector(mouseX, mouseY) | |
@r = random 0, 255 | |
@g = random 0, 255 | |
@b = random 0, 255 | |
@a = 255 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param([string]$logDir) | |
$eventLogs = Get-WmiObject win32_nteventlogfile | |
if (-not (Test-Path $logDir)) { | |
New-Item "C:\logs" -ItemType Directory | |
} | |
foreach($log in $eventLogs) { | |
$logFilePath = [String]::Format("{0}\{1}_{2}.evtx", $logDir, $log.FileName.Replace(" ", "_"), (Get-Date).ToString("yyyyMMdd")) | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/fish | |
for i in (seq 0 255) | |
set -l color_code (printf "%03d" $i) | |
set_color $color_code; echo -n "$color_code " | |
math "$i % 16 == 15" > /dev/null; and echo | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! /usr/bin/env fish | |
function fib | |
set n $argv[1] | |
set acm 1 | |
while math "$n > 1" > /dev/null | |
set acm (math "$acm + $n") | |
set n (math "$n - 1") | |
end |
NewerOlder