Skip to content

Instantly share code, notes, and snippets.

💭
I may be slow to respond.

M Zhuang ilovejs

💭
I may be slow to respond.
  • UNSW Alumni
  • Sydney
Block or report user

Report or block ilovejs

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
@ilovejs
ilovejs / mac_git_tips.md
Last active Aug 13, 2019
tips for mac ssh
View mac_git_tips.md

ssh -T git@github.com

ssh-add ~/.ssh/id_rsa

chmod 700 ~/.ssh/id_rsa

git push origin master to test

Links

@ilovejs
ilovejs / icework3_install.md
Last active Aug 6, 2019
how to run iceworks app or anything
View icework3_install.md

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

View pointer_receiver.go
package main
import (
"fmt"
"math"
)
func main() {
var i interface{}
describe(i)
View validator.go
package main
import (
"fmt"
"gopkg.in/go-playground/validator.v9"
)
// Test ...
type Test struct {
@ilovejs
ilovejs / hyper.js
Created Jul 9, 2019 — forked from coco-napky/hyper.js
Hyper config for git bash in Windows
View hyper.js
module.exports = {
config: {
// default font size in pixels for all tabs
fontSize: 12,
// font family with optional fallbacks
fontFamily: 'Menlo, "DejaVu Sans Mono", Consolas, "Lucida Console", monospace',
// terminal cursor background color and opacity (hex, rgb, hsl, hsv, hwb or cmyk)
cursorColor: 'rgba(248,28,229,0.8)',
@ilovejs
ilovejs / platform.sh
Created Aug 10, 2018 — forked from saicologic/platform.sh
fork of s3-bash
View platform.sh
#!/bin/bash
if [ `uname` = "SunOS" ]; then
alias grep='/usr/gnu/bin/grep'
fi
View Recursive_CTE.sql
--https://www.citusdata.com/blog/2018/05/15/fun-with-sql-recursive-ctes/
--Return: x
WITH RECURSIVE tens(x) AS (
SELECT 10
UNION
SELECT x + 10 FROM tens WHERE x + 10 <= 100
)
SELECT x FROM tens;
--Without having to drop down to a procedural language like plpgsql or plv8.
View CTE_learn.sql
/* Inferred Table */
CREATE TABLE users (
id serial PRIMARY KEY,
email text
);
CREATE TABLE tasks (
id serial PRIMARY KEY,
name text,
project_id NUMERIC,
@ilovejs
ilovejs / CTE_not_fun.sql
Created Jul 12, 2018
CTE has limitation
View CTE_not_fun.sql
--https://www.citusdata.com/blog/2018/05/15/fun-with-sql-recursive-ctes/
--Return: x
WITH RECURSIVE tens(x) AS (
SELECT 10
UNION
SELECT x + 10 FROM tens WHERE x + 10 <= 100
)
SELECT x FROM tens;
--Without having to drop down to a procedural language like plpgsql or plv8.
@ilovejs
ilovejs / rds.sh
Created Jul 2, 2018 — forked from onyxraven/rds.sh
Amazon RDS Performance Tuning Settings
View rds.sh
#XLarge DBInstanceClassMemory = 15892177440 = 14.8GB
#/32 = 496630545 = 473MB
#/64 = 248315272 = 236MB
#/128 = 124157636 = 118MB
#/256 = 62078818 = 59MB
#/512 = 31039409 = 29MB
#/12582880 = 1263 #default same divisor as max_connections = 4041.6MB = 4237924762
#/25165760 = 623 # half of max_connections = 1993.6MB
#/50331520 = 315 # quarter of max_connections = 1008MB = 1056964608
#*(3/4) #default innodb pool size = 11922309120
You can’t perform that action at this time.