Skip to content

Instantly share code, notes, and snippets.

👀

atom matrixcloud

👀
Block or report user

Report or block matrixcloud

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 gencert.sh
#!/bin/sh
# create self-signed server certificate:
read -p "Enter your domain [www.example.com]: " DOMAIN
echo "Create server key..."
openssl genrsa -des3 -out $DOMAIN.key 1024
@matrixcloud
matrixcloud / logging.ini
Created Jan 19, 2019
Python logging config file
View logging.ini
[loggers]
keys=root,app
[handlers]
keys=fileHandler,consoleHandler
[formatters]
keys=defaultFormatter
[logger_root]
View functions.py
with codecs.open('./tmp/' + yt.title + '.xml', 'w+', 'utf-8') as f:
f.write(caption.xml_captions)
View shack-screen.js
// shack screen effect
// @duration
shakeEffect: function (duration) {
this.node.runAction(
cc.repeatForever(
cc.sequence(
cc.moveTo(0.02, cc.p(5, 7)),
cc.moveTo(0.02, cc.p(-6, 7)),
cc.moveTo(0.02, cc.p(-13, 3)),
cc.moveTo(0.02, cc.p(3, -6)),
@matrixcloud
matrixcloud / javaUtf8.sh
Created Jun 19, 2018
jvm file encoding
View javaUtf8.sh
export JAVA_OPTS="$JAVA_OPTS -Dfile.encoding=UTF8"
@matrixcloud
matrixcloud / maven.rt.xml
Created Jun 15, 2018
com.sun.xml.internal.bind.marshaller does not exist
View maven.rt.xml
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<compilerArguments>
<bootclasspath>${JAVA_HOME}/jre/lib/rt.jar</bootclasspath>
</compilerArguments>
</configuration>
View main.js
/*
* Copyright (C) 2017 Shanghai YongXiao Intelligence Co., Ltd.
*/
import React from 'react'
import ReactDOM from 'react-dom'
import { createStore, combineReducers, applyMiddleware } from 'redux'
import { Provider } from 'react-redux'
import { ConnectedRouter, routerReducer, routerMiddleware } from 'react-router-redux'
import { createEpicMiddleware } from 'redux-observable'
View webpack.config.js
const path = require('path')
module.exports = {
entry: './src/main.js',
output: {
filename: 'bundle.js',
path: path.resolve(__dirname, '../static')
},
devtool: 'inline-source-map',
module: {
View .editorconfig
# http://editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
View ViewMapper
public class ViewMapper<T> where T: BaseView {
private static T _ins;
public static T Instance {
get { return _ins; }
set {
if (_ins != null) {
GameObject.DestroyImmediate(_ins.gameObject);
}
_ins = value;
You can’t perform that action at this time.