Skip to content

Instantly share code, notes, and snippets.

View DengYiping's full-sized avatar
:octocat:
Available for hiring

Yiping Deng DengYiping

:octocat:
Available for hiring
View GitHub Profile
@DengYiping
DengYiping / configureStore.js
Created December 3, 2018 09:00
Configure Redux Store and Redux Observable
import rootReducer from '../reducer/rootReducer';
import { createStore, applyMiddleware } from 'redux';
import { createEpicMiddleware } from 'redux-observable';
import rootEpic from '../epic/rootEpic';
function configureStore(default_state = {}){
const epicMiddleware = createEpicMiddleware();
const store = createStore(
rootReducer,
default_state,
package com.billboard.demo.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
import springfox.documentation.builders.PathSelectors;
import springfox.documentation.builders.RequestHandlerSelectors;
import springfox.documentation.service.ApiInfo;
import springfox.documentation.service.Contact;
import springfox.documentation.spi.DocumentationType;
@DengYiping
DengYiping / build.gradle
Last active November 26, 2018 13:15
Gradle file for Spring Application
buildscript {
ext {
springBootVersion = '2.1.0.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
@DengYiping
DengYiping / application.properties
Last active July 25, 2024 16:16
Spring Application Properties for MariaDB
#Database Configuration
spring.datasource.url=jdbc:mariadb://localhost:3306/billboard
spring.datasource.username=root
spring.datasource.password=
spring.datasource.driver-class-name=org.mariadb.jdbc.Driver
#Hibernate Configuration
# Show or not log for each sql query
spring.jpa.show-sql=true
@DengYiping
DengYiping / Tweak.xm
Created July 14, 2018 15:26
Code for soul automatic matching.
%hook MatchChatViewController
- (void)requsetStartMactch {
[NSObject cancelPreviousPerformRequestsWithTarget:self];
%orig;
[self performSelector:@selector(requsetStartMactch) withObject:nil afterDelay:0.30];
}
%end
@DengYiping
DengYiping / purgeAndroid.txt
Created June 5, 2018 10:05 — forked from tahmidsadik/purgeAndroid.txt
How to completely remove Android Studio from Mac OS X
How to Completely Remove Android Studio
Execute these commands from the terminal
rm -Rf /Applications/Android\ Studio.app
rm -Rf ~/Library/Preferences/AndroidStudio*
rm ~/Library/Preferences/com.google.android.studio.plist
rm -Rf ~/Library/Application\ Support/AndroidStudio*
rm -Rf ~/Library/Logs/AndroidStudio*
@DengYiping
DengYiping / .vimrc
Created June 1, 2018 08:14
My own vimrc profile
" File : .vimrc
" Author : Yiping Deng <[email protected]>
" Date : 26.05.2018
" Last Modified Date: 26.05.2018
" Last Modified By : Yiping Deng <[email protected]>
set nocompatible " be iMproved, required
filetype off " required
" set the runtime path to include Vundle and initialize
set rtp+=~/.vim/bundle/Vundle.vim
theory poly
imports Main HOL Nat
begin
(*
* Power function
*)
primrec pow :: "nat \<Rightarrow> nat \<Rightarrow> nat" where
"pow x 0 = Suc 0"
| "pow x (Suc y) = x * pow x y"
theory ExponentialDiophantine
imports Main Nat Int Complex Real HOL
begin
(*
* second order recurrence function
* the first argument is the index
* the second argument is the b in the recurrence
*)
fun Abn :: "nat \<Rightarrow> int \<Rightarrow> int" where