Skip to content

Instantly share code, notes, and snippets.

const fs = require('fs');
const assert = require('assert');
const puppeteer = require('puppeteer');
(async() => {
// const browser = await puppeteer.launch({args: ['--no-sandbox', '--disable-setuid-sandbox']});
const browser = await puppeteer.launch();
const page = await browser.newPage();
@toxn12
toxn12 / null
Created February 18, 2018 03:10
var token = '92a9d6499258c7914d2a193326acb2e5e4e88630';
var url = 'https://api.github.com/gists';
var content = window.getSelection().toString();
var fileName = prompt('ファイル名は何にしますか?', 'index.js');
var json = {
"desctiption": location.href + 'にあったコード',
"public": true,
"files": {}
};
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace DateTimeSample01
{
public class Program
{
public static void Main(string[] args)
@toxn12
toxn12 / TimeToTicks.sql
Created April 12, 2017 14:39
TimeToTicks.sql
CREATE FUNCTION [dbo].[TimeToTicks] (@hour int, @minute int, @second int)
RETURNS bigint
WITH SCHEMABINDING
AS
BEGIN
RETURN (((@hour * 3600) + CONVERT(bigint, @minute) * 60) + CONVERT(bigint, @second)) * 10000000
END
@toxn12
toxn12 / TimeSpan-sample01.cs
Created April 12, 2017 13:58
TimeSpan-sample01.cs
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text.RegularExpressions;
namespace TimeSpanSample01
{
public class Program
{
public static void Main(string[] args)
using System;
using System.ComponentModel;
using System.Windows.Forms;
using mshtml;
namespace MyBrowser
{
class BrowserTab : TabPage
{
public event CancelEventHandler NewWindow;
@toxn12
toxn12 / 0_reuse_code.js
Last active July 17, 2023 06:21
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@toxn12
toxn12 / FileUtility.cs
Last active March 17, 2021 23:22
fileRowDeduplicator
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.IO;
using System.Text;
namespace samples
{
Module Module1
Sub Main()
testOnErrorResumeNext()
testTryCatch()
End Sub
Sub testOnErrorResumeNext()
On Error Resume Next
Dim hoge As Integer
hoge = DirectCast(IIf( TextBox1.Text = "", 0, Integer.Parse(TextBox1.Text) ), Integer)
hoge = If( TextBox1.Text = "", 0, Integer.Parse(TextBox1.Text) )