Skip to content

Instantly share code, notes, and snippets.

Avatar
🍮
I eating custard cake.

Mike Cat ilovejs

🍮
I eating custard cake.
  • Bush
  • Sydney
View GitHub Profile
@ilovejs
ilovejs / write_once.py
Created Apr 14, 2020 — forked from timothycrosley/write_once.py
Write once run every where
View write_once.py
"""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"""
View mysql_create_user.sql
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'@'%';
View code_sign_goland.md

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

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

@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
You can’t perform that action at this time.