Skip to content

Instantly share code, notes, and snippets.

kunst1080 kunst1080

Block or report user

Report or block kunst1080

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@kunst1080
kunst1080 / MouseController.vbs
Last active Jan 18, 2019
VBScriptでマウスポインタを動かしたりクリックしたり座標を取得したりするサンプル
View MouseController.vbs
Set Excel = WScript.CreateObject("Excel.Application")
'キーコード
Const VK_SHIFT = &H10
'マウス定数
Const MOUSEEVENTF_ABSOLUTE = &H8000
Const MOUSE_MOVE = &H1
Const MOUSEEVENTF_LEFTDOWN = &H2
COnst MOUSEEVENTF_LEFTUP = &H4
@kunst1080
kunst1080 / sakura_ftpUpload.js
Created Dec 1, 2013
編集中のファイルをFTPでアップロードするサクラエディタマクロ
View sakura_ftpUpload.js
var util = Utility();
// settings
var FTP_IP = "xxx.xxx.xxx.xxx";
var FTP_USER = "username";
var FTP_PASSWORD = "password";
var FTP_MODE = "ascii";
// メイン関数
(function main(){
@kunst1080
kunst1080 / SimpleWebServer.java
Created Apr 12, 2015
Simple Web Server (Java)
View SimpleWebServer.java
import java.io.File;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintStream;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.util.Scanner;
import java.net.ServerSocket;
import java.net.Socket;
@kunst1080
kunst1080 / open
Created Apr 24, 2017
open explorer in Bash on Ubuntu on Windows (BoW)
View open
#!/bin/bash
if [ $# -eq 0 ]; then
DIR=.
else
DIR=$*
fi
explorer.exe $DIR
View mv-and-check-inode-fts.c
#include stdio.h
#include stdlib.h
#include fts.h
#include string.h
#include sys/stat.h
unsigned long get_inode(char *name) {
unsigned long inode;
struct stat stat_buf;
char path[255];
View mv-and-check-inode.c
#include <stdio.h>
#include <stdlib.h>
#include <dirent.h>
#include <string.h>
#include <sys/stat.h>
unsigned long get_inode(char *name) {
unsigned long inode;
struct stat stat_buf;
char path[255];
@kunst1080
kunst1080 / gist:3706d19a2bc948611d39ecb490a917ec
Last active Nov 7, 2017
マイナンバーシェル芸(文字列結合ではなく数値計算でチェックデジットを計算する) のメモ
View gist:3706d19a2bc948611d39ecb490a917ec
seq 1 99999999999 | awk '{
for(i=1;i<=11;i++){
a=int($0/(10^(i-1)));
b=a-int(a/10)*10;
if(i<=6){
sum+=b*(i+1)
} else {
sum+=b*(i-5)
}
};
@kunst1080
kunst1080 / csv2xls.bat
Created Mar 31, 2013
CSVファイルをEXCELに変換するBATファイル。 テキストを解析するのが面倒なので、そこはEXCELの機能を使用。
View csv2xls.bat
@if (1==1) /*
@echo off
if "%~3"=="" goto :USAGE
if "%~1"=="/?" goto :USAGE
rem ********************************************************************************
:MAIN
CScript //nologo //E:JScript "%~f0" %*
If ERRORLEVEL 1 goto :USAGE
@kunst1080
kunst1080 / each.bat
Created Feb 3, 2014
xargs like command on cmd.exe
View each.bat
@echo off
if "%~1"=="" goto :USAGE
:MAIN
set COMMAND=%*
for /f "usebackq tokens=*" %%o in (`findstr .*`) do (
call %%COMMAND:?=%%o%%
)
goto :eof
@kunst1080
kunst1080 / ShellScriptInBAT.bat
Last active Apr 24, 2017
ShellScript in Windows BAT
View ShellScriptInBAT.bat
@rem '
@echo off
set P="/mnt/%~f0"
set P=%P:\=/%
set P=%P::=%
set P=%P:/mnt/C/=/mnt/c/%
set P=%P:/mnt/D/=/mnt/d/%
bash.exe %P% %*
You can’t perform that action at this time.