Skip to content

Instantly share code, notes, and snippets.

View naturallucky's full-sized avatar

naturallucky naturallucky

View GitHub Profile
@naturallucky
naturallucky / updateReNewFile
Last active August 3, 2022 20:17
PowerShell
#usage
# ./updateFile.ps1 ... before check
# or
# ./updateFile.ps1 cp ... copy
#copy from (if new)
$dir1="C:\AllFolder\xxx"
#copy to
$dir2="\\wsl$\Ubuntu\opt\xxx"
@naturallucky
naturallucky / js await
Last active September 15, 2021 18:21
//アロー関数、レキシカルクロージャを使わないバージョン
function taskManager(){
//"jsから resolve用関数を引数で渡される"ので、同期して行いたいことが終わったら結果を受けて、それに処理を返す。
let taskHandler = function(resFuncArg,denyFuncArg) {
//5
// do something ....
// many many
// yeah , many many
function resolveAfter2Seconds() {
//main objective
let taskHandler = function (thisResfuncArg,denyFuncArg){
// 6
// do something ....
// many many
// yeah , many many
function outputDblAry(dblArray) {
const lineList = dblArray.map(cell => cell.join(','));
const dblAryStr = lineList.join('\n');
return dblAryStr;
};
let m = [[1,2,3],[4,5,6]];
let n = outputDblAry(m);
@naturallucky
naturallucky / [css]3D small set
Last active January 13, 2022 07:14
css3D smal set
.view3D{
transform-style:preserve-3d;
perspective:300px;
perspective-origin: center center;
--rotate3DX:70deg;
--rotate3DY:0;
--rotate3DZ:0;
--move3DZ:50px;
}
.view3D>*{
@naturallucky
naturallucky / videoSpeedChanger_bookmarklet
Last active June 11, 2021 03:47
bookmarklet for youtube (Enhance for youtube)
javascript:(function (){ var v = document.querySelector('video');v.playbackRate = 1.0;})();
@naturallucky
naturallucky / gist:f905fb0c2c72f8d1a3bc79903b11f96d
Created November 1, 2020 16:34
[Excel vba]Insert string at head of cell when matching
Sub マッチパターンの時だけセル先頭に文字追加()
' ee8dff -> #ee8dff
Dim c As Range
Dim v As String
Dim reRGB, reSharp6, reSharp3 As Object 'New RegExp
Dim mc As Object 'MatchCollection
Set reSharp6 = CreateObject("VBScript.RegExp")
reSharp6.Pattern = "(^[0-9a-fA-F]{1,6}$)"
@naturallucky
naturallucky / vba
Last active November 2, 2020 01:20
[EXCEL VBA]Set cell background color as the cell value like #88dd8f in Selection Range
Sub セルから背景色設定()
'
' 選択範囲のそれぞれのセルの値から、そのセル自身に背景色設定 Macro
' cell : "#0fa" "#00ffdd" , "33,44,44" / and "123,212,213" too (^^;> excel vba 2016
Dim c As Range
Dim v, vt, vtt As String
Dim l As Long
Dim r, g, b As Integer
Dim reRGB, reSharp6, reSharp3 As Object 'New RegExp
<style>
/* for bottom */
.fukidashi{
display: inline-block;
font-size:12pt;
padding: 5pt;
background: #fff;
border: 1px solid gray;
border-radius: 3%;
}
<style>
input[type="radio"][name="Document"] {
display:none;
}
.tabLabel{
width:30pt;height:15pt;
border:2pt solid black;
background:#cca;
transition: background-color 1s;
border-radius: 15% 15% 0 0;