Skip to content

Instantly share code, notes, and snippets.

@acbart
acbart / blockly_to_svg.js
Last active August 5, 2024 00:03
Blockly SVG -> Image
function renderSimple(workspace) {
aleph = workspace.svgBlockCanvas_.cloneNode(true);
aleph.removeAttribute("width");
aleph.removeAttribute("height");
if (aleph.children[0] !== undefined) {
aleph.removeAttribute("transform");
aleph.children[0].removeAttribute("transform");
aleph.children[0].children[0].removeAttribute("transform");
var linkElm = document.createElementNS("http://www.w3.org/1999/xhtml", "style");
linkElm.textContent = Blockly.Css.CONTENT.join('') + '\n\n';
@JanTvrdik
JanTvrdik / record-screen.ps1
Last active October 31, 2021 08:21
Windows FFmpeg-based H.264 lossless screen recording
# https://trac.ffmpeg.org/wiki/Capture/Desktop
# https://ffmpeg.org/ffmpeg-devices.html#gdigrab
# https://trac.ffmpeg.org/wiki/Encode/H.264#LosslessH.264
# WARNING: THE RECORDING WILL STOP WHEN UAC POPUP IS SHOWN
C:\SoftPortable\ffmpeg\bin\ffmpeg `
-f gdigrab -framerate 30 -draw_mouse 1 -i desktop `
-c:v libx264 -qp 0 -pix_fmt yuv444p -preset ultrafast `
"C:\Videos\recording-$(get-date -f yyyy-MM-dd-Hmss).mp4"
<!doctype html>
<html>
<head>
<script src="https://haversineconsulting.quickbase.com/db/bf3zb9bph?a=dbpage&pagename=d3.v3.min.js"></script>
<script src="https://haversineconsulting.quickbase.com/db/bf3zb9bph?a=dbpage&pagename=dagre-d3.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/1.7.2/jquery.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/underscore.js/1.8.3/underscore-min.js"></script>
@afomi
afomi / graphviz.html
Last active August 10, 2018 07:23
Graphviz Example
<script type="text/vnd.graphviz" id="graphviz">
digraph G {
"browser" ->
"http_request" ->
"server" ->
"routes" ->
"controller" ->
"model" -> "controller"
"controller" -> "response"
"response" -> "view" -> "html"
@anhldbk
anhldbk / Selenium.Python.InjectJS.py
Last active April 15, 2023 03:53
Inject jQuery into Selenium Driver
from selenium import webdriver
driver = webdriver.Firefox()
driver.get('https://www.facebook.com/')
with open('jquery-1.9.1.min.js', 'r') as jquery_js:
jquery = jquery_js.read() #read the jquery from a file
driver.execute_script(jquery) #active the jquery lib
driver.execute_script("$('#email').text('anhld')")
@IzumiSy
IzumiSy / manifest.json
Last active August 16, 2024 05:25
Chrome.storage.sync example
{
"name": "SyncExtension",
"version": "0.1",
"manifest_version": 2,
"description": "Storage Sync Extension",
"permissions": [ "storage" ],
"browser_action": {

公司背景介绍

美团网作为本地电⼦商务的领头企业,致⼒于改造传统服务业,实现从商家端到消费者端的彻底信息化,实现⽤户和商户的⾼效联结。2010年3月4日,美团网在北京上线,是中国最早的独立团购网站,2003年4月,大众点评网于成立于上海,中国最早的第三方消费点评网站。2015年10月8日美团网与大众点评网达成历史性战略合作,成为中国O2O绝对领导者。我们仅次于阿里,超过京东,从年购买用户数、月活跃用户数、日订单量的维度,美团点评已是第二大电商平台,创造了全球互联网未上市最大单笔融资纪录。我们是一家“互联网+”公司,致力于为各行各业创造价值,打造闭环。美团酒店目前是中国最大的移动端酒店预订平台,第二大酒店分销平台,2015年间夜量超8500万。

引言

生命中没有什么是恒久不变的,只有死鱼才随波逐流,尝试改变自己。

工作描述

@addyosmani
addyosmani / headless.md
Last active July 22, 2025 02:26
So, you want to run Chrome headless.

Update May 2017

Eric Bidelman has documented some of the common workflows possible with headless Chrome over in https://developers.google.com/web/updates/2017/04/headless-chrome.

Update

If you're looking at this in 2016 and beyond, I strongly recommend investigating real headless Chrome: https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md

Windows and Mac users might find using Justin Ribeiro's Docker setup useful here while full support for these platforms is being worked out.

@flytwokites
flytwokites / autowallpaper.py
Last active December 10, 2015 21:08
Change Gnome wallpaper automatically.
#!/usr/bin/env python
import urllib
import bs4
import random
import re
import os
import sys
import base64
import json
from gi.repository import Gio
@syxc
syxc / DownLoadFile.cs
Created November 13, 2012 05:22
C# Http文件下载公共类(支持断点续传)
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
using System.Net;
namespace XcDownLoadFile
{
public class DownLoadFile