Skip to content

Instantly share code, notes, and snippets.

View Volune's full-sized avatar

Jeremy Judeaux Volune

  • China, Shanghai
View GitHub Profile
@Volune
Volune / a.js
Last active December 15, 2015 09:18
Try to reproduce browserify/browserify#338, sometime fails because the bug is dependent of results order of asynchronous calls
var common = require('./common');
common.log('A');
@Volune
Volune / TestEscaping.java
Created September 6, 2013 16:41
Test strings with reverse solidus (backslash) in orientdb 1.5.1
import com.orientechnologies.orient.core.db.document.ODatabaseDocumentTx;
import com.orientechnologies.orient.core.record.impl.ODocument;
import com.orientechnologies.orient.core.sql.OCommandSQL;
import java.util.List;
public class TestEscaping {
private ODatabaseDocumentTx db;
public static void main(String... args) {
@Volune
Volune / DbImportOldDatabaseTest.java
Created September 9, 2013 12:54
OrientDB 1.5.1 and 1.6.0, Test the import of an "old" database : clusters ids and names doesn't match the new database schema.
package com.orientechnologies.orient.test;
import com.orientechnologies.orient.core.Orient;
import com.orientechnologies.orient.core.command.OCommandOutputListener;
import com.orientechnologies.orient.core.db.graph.OGraphDatabase;
import com.orientechnologies.orient.core.db.tool.ODatabaseExport;
import com.orientechnologies.orient.core.db.tool.ODatabaseImport;
import com.orientechnologies.orient.core.hook.ORecordHook;
import com.orientechnologies.orient.core.metadata.schema.OSchema;
import com.orientechnologies.orient.core.record.impl.ODocument;
function createBackground() {
}
var StartScreenLayer = cc.Layer.extend({
ctor: function () {
this._super();
// this function can call createBackground!
createBackground.call(this);
},
callCreateBackgroundToo: function () {
@Volune
Volune / mobileaudio.html
Created July 20, 2016 08:27
Issue on android chrome playing audio from blob
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Issue audio from blob</title>
</head>
<body>
@Volune
Volune / .gitignore
Last active September 1, 2016 06:26
webpack-dev-server#474 example
.idea/
node_modules/
build/
@Volune
Volune / cmdnode
Created April 10, 2018 09:58
Tool to help run node from Windows
#/bin/sh
for a in $*; do
echo "$a" | awk 'match($0, /^(\w):(\\.*)$/, m) { p = m[2]; gsub(/\\/,"/",p); print "/mnt/" tolower(m[1]) p; next }; { print }';
done | xargs node
@Volune
Volune / InterfaceWithOverrides.js
Created September 20, 2018 09:42
Customize react-dates component style with existing global classes
import CSSInterface from 'react-with-styles-interface-css';
const InterfaceWithOverrides = Object.create(CSSInterface);
const OVERRIDES_KEY = Symbol('overrides');
Object.assign(InterfaceWithOverrides, {
[OVERRIDES_KEY]: [],
addOverride(override) {
this[OVERRIDES_KEY].push(override);
},
resolve(...args) {
import React from 'react';
const ReduxContext = React.createContext();
export default ReduxContext;
import { useRef } from 'react';
const getComponentName = WrappedComponent => (
WrappedComponent.displayName || WrappedComponent.name || 'Unknown'
);
const compareProps = (obj1, obj2) => {
let keys1 = Object.keys(obj1);
const sameValues = keys1.every(
key => obj2.hasOwnProperty(key) && obj2[key] === obj1[key],