Skip to content

Instantly share code, notes, and snippets.

View ilovejs's full-sized avatar
🐡

Hao ilovejs

🐡
  • 15:19 (UTC +10:00)
View GitHub Profile
@ilovejs
ilovejs / icework3_install.md
Last active August 6, 2019 00:43
how to run iceworks app or anything

simplified steps

git checkout branch release/3.0.3
cd packages/iceworks-server && yarn install

cd tools/iceworks-app/renderer && yarn install && yarn start
cd tools/iceworks-app && yarn install && yarn start

variations and pc setups

@ilovejs
ilovejs / mac_git_tips.md
Last active August 13, 2019 05:13
tips for mac ssh

ssh -T [email protected]

ssh-add ~/.ssh/id_rsa

chmod 700 ~/.ssh/id_rsa

git push origin master to test

Links

codesign -vvv /Applications/GoLand.app/Contents/MacOS/goland

codesign -vvv /Applications/GoLand.app/Contents/plugins/go/lib/dlv/mac/dlv

CREATE USER 'newuser'@'%' IDENTIFIED BY 'user_password';
DROP user 'qor'@'localhost';
CREATE USER 'qor'@'%' IDENTIFIED BY 'qor';
CREATE DATABASE qor_test;
GRANT ALL ON qor_test.* TO 'qor'@'localhost';
GRANT ALL ON qor_test.* TO 'qor'@'%';
@ilovejs
ilovejs / write_once.py
Created April 14, 2020 12:14 — forked from timothycrosley/write_once.py
Write once run every where
"""An example of writing an API to scrape hacker news once, and then enabling usage everywhere"""
import hug
import requests
@hug.local()
@hug.cli()
@hug.get()
def top_post(section: hug.types.one_of(('news', 'newest', 'show'))='news'):
"""Returns the top post from the provided section"""
@ilovejs
ilovejs / balance_test.go
Created September 4, 2020 11:51 — forked from liutianpeng/balance_test.go
消息队列高手课 Mutex,CAS&FAA作业程序
package balance
import (
"runtime"
"sync"
"sync/atomic"
"testing"
)
const MaxCount = 10000
@ilovejs
ilovejs / GLSL-Noise.md
Created September 4, 2020 11:52 — forked from liutianpeng/GLSL-Noise.md
GLSL Noise Algorithms

Generic 1,2,3 Noise

float rand(float n){return fract(sin(n) * 43758.5453123);}

float noise(float p){
	float fl = floor(p);
  float fc = fract(p);
	return mix(rand(fl), rand(fl + 1.0), fc);
}

Keybase proof

I hereby claim:

  • I am ilovejs on github.
  • I am iot11 (https://keybase.io/iot11) on keybase.
  • I have a public key ASCoz4CUKHHHa4Y-H_aote3AlQkTYZO4OopKdszBkxiQKAo

To claim this, I am signing this object:

import 'dart:convert';
import 'dart:math';
import 'dart:ui';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
void main() => runApp(ApiCall());
class ApiCall extends StatelessWidget {