Skip to content

Instantly share code, notes, and snippets.

youmoo Youmoo

Block or report user

Report or block Youmoo

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
Youmoo /
Created Sep 5, 2017 — forked from wombat/
QR-Code with embedded logo
// Create new configuration that specifies the error correction
Map<EncodeHintType, ErrorCorrectionLevel> hints = new HashMap<EncodeHintType, ErrorCorrectionLevel>();
hints.put(EncodeHintType.ERROR_CORRECTION, ErrorCorrectionLevel.H);
QRCodeWriter writer = new QRCodeWriter();
BitMatrix bitMatrix = null;
ByteArrayOutputStream baos = new ByteArrayOutputStream();
try {
// Create a qr code with the url as content and a size of 250x250 px
Youmoo / index.js
Created Sep 1, 2017 — forked from malyw/index.js
Capture DOM element screenshot using Chrome headless
View index.js
const puppeteer = require('puppeteer');
(async () => {
const browser = await puppeteer.launch();
const page = await browser.newPage();
// Adjustments particular to this page to ensure we hit desktop breakpoint.
page.setViewport({width: 1000, height: 600, deviceScaleFactor: 1});
await page.goto('', {waitUntil: 'networkidle'});
Youmoo /
Last active Nov 28, 2016
favorite words && 喜欢的单词


// 格式化为es批量插入格式
[...$$('[itemprop=text] p')]
{ "word":"${v}", "sentence":"", "def":"", "created":"2016-11-28"}`).join('\n')

Keybase proof

I hereby claim:

  • I am youmoo on github.
  • I am youmoo ( on keybase.
  • I have a public key ASAJAXL8jWuz6cgTM6fmKGMpGMZHaSpYcaSPNfo-XAf5vwo

To claim this, I am signing this object:

Youmoo / post-merge
Created Oct 27, 2015 — forked from sindresorhus/post-merge
git hook to run a command after `git pull` if a specified file was changed. In this example it's used to run `npm install` if package.json changed and `bower install` if `bower.json` changed. Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
View post-merge
#/usr/bin/env bash
# MIT © Sindre Sorhus -
# git hook to run a command after `git pull` if a specified file was changed
# Run `chmod +x post-merge` to make it executable then put it into `.git/hooks/`.
changed_files="$(git diff-tree -r --name-only --no-commit-id ORIG_HEAD HEAD)"
check_run() {
echo "$changed_files" | grep --quiet "$1" && eval "$2"
Youmoo /
Created Nov 12, 2014
if-else in 2 flavors


flavor 1:

var cond=true;
    // your logic
    // your logic
View custom-array-like-object.js
var array_like = {};
array_like[ 0 ] = "test 0";
array_like[ 1 ] = "test 1";
array_like[ 2 ] = "test 2";
array_like[ 3 ] = "test 3";
array_like.length = 4;
array_like.splice = [].splice;
View gist:29f4a525bdab4541631c
public class Volatility {
static int NEXT_IN_LINE = 0;
public static void main(String[] args) throws Exception {
new CustomerInLine().start();
new Queue().start();
static class CustomerInLine extends Thread {
View pom.xml
<project xmlns=""
You can’t perform that action at this time.