Skip to content

Instantly share code, notes, and snippets.

@jsts
jsts / gist:e398fdaef7848f994f8d532b7df741b5
Last active January 31, 2023 22:14
Headless Chrome

Reference URL [https://developers.google.com/web/updates/2017/06/headless-karma-mocha-chai]

module.exports = {
  'launcher:Chrome': ['type', ChromeBrowser],
  'launcher:ChromeHeadless': ['type', ChromeHeadlessBrowser],
  'launcher:ChromeCanary': ['type', ChromeCanaryBrowser],
  'launcher:ChromeCanaryHeadless': ['type', ChromeCanaryHeadlessBrowser],
  'launcher:Chromium': ['type', ChromiumBrowser],
  'launcher:Dartium': ['type', DartiumBrowser]
@jsts
jsts / gist:08aee89c09ccce32c1618e2d16e81e88
Created December 31, 2016 12:24 — forked from samhocevar/gist:00eec26d9e9988d080ac
Configure sshd on MSYS2 and run it as a Windows service
#!/bin/sh
#
# msys2-sshd-setup.sh — configure sshd on MSYS2 and run it as a Windows service
#
# Please report issues and/or improvements to Sam Hocevar <[email protected]>
#
# Prerequisites:
# — MSYS2 itself: http://sourceforge.net/projects/msys2/
# — admin tools: pacman -S openssh cygrunsrv mingw-w64-x86_64-editrights
#
@jsts
jsts / baidu-pan-batch-save-3.4.4.js
Created September 20, 2016 04:10 — forked from mcxiaoke/baidu-pan-batch-save-3.4.4.js
贪灵Gollum for Baiduyun, Ver.3.4.4
/**
* 贪灵Gollum for Baiduyun, Ver.3.4.4
* 立即执行函数:百度云盘批量转存用户分享。
*
* 【特点】
* - 可保持或无视原分享者的目录结构。
* - 支持差分转存。
* - 自动分解转存,可突破单次转存总文件数5000的限制。
* - 可在分享主页下,进入某文件夹来转存其下级子文件夹。
* - 支持专辑转存。
import React from "react";
import { render } from "react-dom";
const ParentComponent = React.createClass({
getDefaultProps: function() {
console.log("ParentComponent - getDefaultProps");
},
getInitialState: function() {
console.log("ParentComponent - getInitialState");
return { text: "" };