Skip to content

Instantly share code, notes, and snippets.

View mosluce's full-sized avatar

mosluce mosluce

View GitHub Profile
@mosluce
mosluce / withQuery.js
Created January 23, 2019 04:57
react-apollo Query hoc
import React from 'react';
import { Query } from "react-apollo";
import hoist from 'hoist-non-react-statics';
import compareProps from '../compareProps';
const withQuery = (query, { name, options = {}, mapPropKeys = [] }) => (WrappedComponent) => {
class WithQuery extends React.Component {
constructor() {
super();
#!/bin/bash
curl -sSL get.docker.com | sh -
git clone -b mujson https://github.com/mosluce/shadowsocksr
cd shadowsocksr
docker build -t ssr .
docker run -d --restart=always -p 6540-6550:6540-6550 --name ssr ssr
for (( i=1; i<=2; i++ ))
do
import React, { PureComponent } from "react";
import {
View,
TextInput,
TextInputProps,
ViewStyle,
TextStyle,
StyleProp,
Platform,
} from "react-native";
import React, { PureComponent } from "react";
import {
View,
Text,
TouchableWithoutFeedback,
Picker,
PickerItemProps,
Modal,
Animated,
TouchableWithoutFeedbackProps,
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Networking;
public class LoadJson : MonoBehaviour
{
// Use this for initialization
IEnumerator Start()
public Circle(Vector3 center, Vector3 normal, int polyAmount, float radius)
{
this.normal = normal.normalized;
this.center = center;
var z = Vector3.forward;
var dot = Vector3.Dot(z, normal);
var y = z - dot * normal;
if (dot == 1 || dot == -1)
version: '3'
services:
db:
image: mysql:5.6
container_name : sspanel-db
restart: always
environment:
MYSQL_ROOT_PASSWORD: yourpass
MYSQL_DATABASE: sspanel
@mosluce
mosluce / install_ssr_server.sh
Last active May 2, 2018 01:09
ShadowsocksR 一鍵安裝 for Ubuntu Only
#!/bin/bash
apt-get update
apt-get install -y git-core
curl -sSL get.docker.com | sh -
git clone -b mujson https://github.com/mosluce/shadowsocksr.git
cd shadowsocksr
gcc -Wall -Wno-unused-result -Wno-unknown-pragmas -Wfatal-errors -fPIC -Ofast -DOPENCV -shared obj/gemm.o obj/utils.o obj/cuda.o obj/deconvolutional_layer.o obj/convolutional_layer.o obj/list.o obj/image.o obj/activations.o obj/im2col.o obj/col2im.o obj/blas.o obj/crop_layer.o obj/dropout_layer.o obj/maxpool_layer.o obj/softmax_layer.o obj/data.o obj/matrix.o obj/network.o obj/connected_layer.o obj/cost_layer.o obj/parser.o obj/option_list.o obj/detection_layer.o obj/route_layer.o obj/upsample_layer.o obj/box.o obj/normalization_layer.o obj/avgpool_layer.o obj/layer.o obj/local_layer.o obj/shortcut_layer.o obj/logistic_layer.o obj/activation_layer.o obj/rnn_layer.o obj/gru_layer.o obj/crnn_layer.o obj/demo.o obj/batchnorm_layer.o obj/region_layer.o obj/reorg_layer.o obj/tree.o obj/lstm_layer.o obj/l2norm_layer.o obj/yolo_layer.o -o libdarknet.so -lm -pthread `pkg-config --libs opencv`
Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to th
//
// AppDelegate.swift
// Signbook
//
// Created by 默司 on 2018/3/16.
// Copyright © 2018年 CCMOS. All rights reserved.
//
import UIKit
import IQKeyboardManagerSwift