Skip to content

Instantly share code, notes, and snippets.


Yieldone sincerefly

Block or report user

Report or block sincerefly

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
View index.html
<!DOCTYPE html>
* Copyright (c) 2015 The WebRTC project authors. All Rights Reserved.
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree.
sincerefly / headless.txt
Last active Jan 16, 2019
selenium vs puppeteer (chrome & Firefox) 打印网页标题
View headless.txt
[dongdong@fedora29 headless-test]$ cat
from selenium import webdriver
from selenium.webdriver.firefox.options import Options
options = Options()
options.headless = True
driver = webdriver.Firefox(options=options)
driver.set_window_position(0, 0)
driver.set_window_size(1366, 768)
View async-retry.js
// From:
const superagent = require('superagent');
const NUM_RETRIES = 3;
async function test() {
let i;
sincerefly / Promise.all和Async-Await
Created Jan 15, 2019
View Promise.all和Async-Await
const bcrypt = require('bcrypt');
const NUM_SALT_ROUNDS = 8;
async function test() {
const pws = ["passwd", "passwd2", "passed3"];
const promises = => bcrypt.hash(pw, NUM_SALT_ROUNDS));
const result = await Promise.all(promises);
sincerefly / index.html
Last active Sep 11, 2019
Electron文件拖拽与打开文件管理器选择文件路径,导出SQLite3数据库中的数据到Excel 运行效果与说明:
View index.html
<!DOCTYPE html>
<meta charset="UTF-8">
<title>数据导出工具 V1.0.2 </title>
<link rel="stylesheet" href="style.css">
<div class="date-select">
sincerefly /
Created Sep 20, 2017
use std::fs;
use std::io;
use std::path::Path;
extern crate time;
fn timestamp() -> f64 {
let timespec = time::get_time();
// 1459440009.113178
let mills: f64 = timespec.sec as f64 + (timespec.nsec as f64 / 1000.0 / 1000.0 / 1000.0);
sincerefly /
Created Sep 12, 2017
rust include_bytes宏示例,加载DLL到EXE中,使用时解压出来调用,调用DLL并将DLL返回的信息复制到粘贴板
extern crate clipboard;
use clipboard::ClipboardProvider;
use clipboard::ClipboardContext;
extern crate libloading;
use libloading::{Library, Symbol};
use std::io::prelude::*;
use std::path::Path;
use std::ffi::CStr;
sincerefly /
Created Jul 28, 2017
import sys
class global_flag(object):
def __init__(self):
self.flag_value = False
def get(self):
return self.flag_value
def change(self):
self.flag_value = not self.flag_value
sincerefly /
Created Jul 28, 2017
#!/bin/env python
# -*- coding: utf-8 -*-
from __future__ import division
from threading import Thread
import subprocess
import psutil
import time
import os
sincerefly /
Created Nov 4, 2016
# -*- coding: utf-8 -*-
from bs4 import BeautifulSoup
import requests
import json
def get_html(url , data = None):
r = requests.get(url, timeout=10)
You can’t perform that action at this time.