Skip to content

Instantly share code, notes, and snippets.

Avatar

陈学家 - XUEJIA CHEN 6174

View GitHub Profile
@6174
6174 / watercolors.js
Created August 16, 2021 14:11 — forked from zapthedingbat/watercolors.js
Generate watercolor style blobs: Inspired by tyler hobbs's generative watercolors- https://tylerxhobbs.com/
View watercolors.js
(function(doc) {
const TWO_PI = Math.PI * 2;
const HALF_PI = Math.PI / 2;
const RADIUS_SCALE = 0.05;
const RADIUS_SD = 15;
const POLYGON_SIDES = 5;
const POSITION_SD = 0.04;
const BASE_DEFORMATIONS = 3;
const LAYER_DEFORMATIONS = 3;
const LAYERS = 40;
@6174
6174 / Guess.js
Created November 17, 2017 02:54
平均优化
View Guess.js
/**
* <p>Desc:竞彩类</p>
* <p>Author: luochang</p>
* <p>Copyright: Copyright (c) 2012</p>
* <p>Company: 北京中科易达科技发展有限责任公司</p>
* Added by Luochang at 2014/3/6 Version 1.0
*/
function Guess(lienseId, playId) {
this.licenseId = lienseId; // 彩种,9-竞彩足球,10-竞彩篮球
View index.html
<!doctype html>
<html>
<head>
<title>Mathcha</title>
<link rel="stylesheet" href="/resources/fonts-8fdb539.css" />
<link rel="icon"
type="image/png"
href="/resources/logo.png"/>
<meta name=viewport content="width=device-width, height=device-height, initial-scale=1">
@6174
6174 / go.js
Created August 14, 2017 02:23
gojs parsed source
View go.js
This file has been truncated, but you can view the full file.
(function(window) {
var g, da = {};
if (!window.document || void 0 === window.document.createElement("canvas").getContext) {
throw window.console && window.console.log("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode."), Error("The HTML Canvas element is not supported in this browser,or this browser is in Compatibility mode.")
}
if (!Object.defineProperty) {
throw Error("GoJS requires a newer version of JavaScript")
}
Function.prototype.bind || (Function.prototype.bind = function(a) {
function b() {
@6174
6174 / main.css
Created June 12, 2017 01:31
litttle iso city generator colored https://codepen.io/nicoptere/pen/awzbQW
View main.css
html,
body {
width: 100%;
height: 100%;
overflow: hidden;
top: 0;
left: 0;
margin: 0;
padding: 0;
}
@6174
6174 / golang-tls.md
Created December 12, 2016 06:33 — forked from denji/golang-tls.md
Simple Golang HTTPS/TLS Examples
View golang-tls.md
Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048
    
# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
openssl ecparam -genkey -name secp384r1 -out server.key
View ajaxFileUpload.js
jQuery.extend({
createUploadIframe: function(id, uri) {
//create frame
var frameId = 'jUploadFrame' + id;
var iframeHtml = '<iframe id="' + frameId + '" name="' + frameId + '" style="position:absolute; top:-9999px; left:-9999px"';
if (window.ActiveXObject) {
if (typeof uri == 'boolean') {
iframeHtml += ' src="' + 'javascript:false' + '"';
} else if (typeof uri == 'string') {
iframeHtml += ' src="' + uri + '"';
@6174
6174 / moment-calender.js
Created April 19, 2016 07:41
moment-calender
View moment-calender.js
var moment = require('moment');
require('moment-range');
function getEventStart(event)
{
var date = typeof this.options.eventStartDate === 'function' ?
this.options.eventStartDate(event) : event[this.options.eventStartDate];
if (date) {
return moment(date)
@6174
6174 / rust_linear_regression
Last active November 13, 2019 08:54
rust linear regression
View rust_linear_regression
// ==================================
// linear regression trainer in rust
// @author 6174
// ==================================
// use std::cell::RefCell;
use std::vec::Vec;
fn main() {
// linear_regression();
View revert.git
git reset --hard <commit_id>
git push origin HEAD:master --force