This file contains 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
" Set CMD 既定値に戻す | |
function! Fsetcmd() | |
set shell& | |
set shellcmdflag& | |
set shellslash& | |
set shellquote& | |
set shellxquote& | |
set shellxescape& | |
set grepprg& |
This file contains 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
<!DOCTYPE html> | |
<html lang="ja"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<style type="text/css"> | |
table,th,td { | |
border-collapse: collapse; | |
border: 1px solid #aaa; | |
} |
This file contains 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
/******************************************************************************* | |
description: | |
ローカルのエクセルファイルを選択すると(<input type="file" id="select-file">、 | |
選択したエクセルファイルへシートを追加し、テーブル要素(<table id="table-0">)を書込み、 | |
そのエクセルシートをダウンロードするためのリンクをdocument.body に追加します。 | |
※このままのコードだと、セルの書式属性は全部消えます。 | |
*******************************************************************************/ | |
(function($) { |
This file contains 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
/******************************************************************************* | |
Create screenshot for specified url. if success, output PNG binary data to STDOUT. | |
usage: | |
$ node screenshot.js URL [CSS SELECTOR] > screenshot.png | |
* if you want to get jpeg file ,use ImageMagick(convert) with pipe. | |
for example, | |
$ node screenshot.js URL | convert - screenshot.jpg | |
*******************************************************************************/ | |
const WebDriver = require('selenium-webdriver'); |
This file contains 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
$ node screenshot.js 'http://localhost/hogehoge/' | convert PNG:- -resize 600x screenshot.jpg | |
(node:14444) UnhandledPromiseRejectionWarning: Error: ESPIPE: invalid seek, write | |
at writeSync (fs.js:568:3) | |
at takeScreenshot.then (/mnt/c/Users/ddk5010/Desktop/temp/screenshot.js:75:39) | |
at process._tickCallback (internal/process/next_tick.js:68:7) | |
(node:14444) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function witho | |
ut a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 2) | |
(node:14444) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will te | |
rminate the Node.js process with a non-zero exit code. | |
convert: improper image header `/tmp/magick-14445jzJc3SLocfrG' @ error/png.c/ReadPNGImage/3940. |
This file contains 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
/// <summary> | |
/// コンソール関連のヘルパー&ラッパー関数など。C#4.0必須 | |
/// </summary> | |
public static class ConsoleEx | |
{ | |
/// <summary> | |
/// メッセージを出力してキー入力を待機します。 | |
/// </summary> | |
public static ConsoleKeyInfo WriteLineAndReadKey(string msg = "\n何かキーを押してください。",bool echoback = false) | |
{ |
This file contains 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
/* | |
CommandLineToArgv() | |
エラーチェック・バッファチェックはしていない不完全版 | |
ex.) | |
int argc = 0; | |
LPTSTR* argv = CommandLineToArgv(GetCommandLine(),&argc); | |
・・・ | |
GlobalFree((HGLOBAL)argv); | |
*/ |
This file contains 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
#define GLOBALALLOC(S) reinterpret_cast(GlobalAlloc(GPTR,(S))) | |
#define GLOBALFREE(X) {if(X){GlobalFree(reinterpret_cast(X));(X)=NULL;}} | |
#define HEAPALLOC(S) HeapAlloc(GetProcessHeap(),HEAP_ZERO_MEMORY,(S)) | |
#define HEAPFREE(X) {if(X){HeapFree(GetProcessHeap(),0,reinterpret_cast(X));(X)=NULL;}} | |
PSTR *CommandLineToArgvA(LPCSTR lpCmdLine,int *pNumArgs) | |
{ | |
PSTR *pArgvA = NULL; | |
int Argc = 0; |
This file contains 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
#!/bin/sh | |
### capture image from movie file. | |
# defines default values | |
interval=60 | |
bg=black | |
start=1 | |
column=4 | |
imagetype=png | |
vcodec=png |