Skip to content

Instantly share code, notes, and snippets.

View tucq88's full-sized avatar
🎯
Fake it till you make it. Confidence is more important than knowledge.

Tu Chu tucq88

🎯
Fake it till you make it. Confidence is more important than knowledge.
View GitHub Profile
@tucq88
tucq88 / gist:981f7c24ae6933b3db1848600d95422e
Created November 27, 2023 16:14 — forked from levelsio/gist:5bc87fd1b1ffbf4a705047bebd9b4790
Secret of Monkey Island: Amsterdam (by @levelsio) or how to create your own ChatGPT image+text-based adventure game
# 2023-11-27 MIT LICENSE
Here's the open source version of my ChatGPT game MonkeyIslandAmsterdam.com.
It's an unofficial image+text-based adventure game edition of Monkey Island in Amsterdam, my home town.
Please use it however you want. It'd be nice to see more ChatGPT-based games appear from this. If you get inspired by it, please link back to my X https://x.com/levelsio or this Gist so more people can do the same!
Send me your ChatGPT text adventure game on X, I'd love to try it!
@tucq88
tucq88 / progress.10s.sh
Created October 17, 2018 03:52 — forked from aurorabbit/progress.10s.sh
Bitbar timely progress bar
#!/bin/sh
# add this to your bitbar directory
# don't forget to chmod +x
# width and characters for the progress bars
# feel free to configure these
width=30
fill_char="█"
empty_char="▁"
@tucq88
tucq88 / tutorial.md
Created August 2, 2018 15:02 — forked from swalkinshaw/tutorial.md
Designing a GraphQL API

Tutorial: Designing a GraphQL API

This tutorial was created by Shopify for internal purposes. We've created a public version of it since we think it's useful to anyone creating a GraphQL API.

It's based on lessons learned from creating and evolving production schemas at Shopify over almost 3 years. The tutorial has evolved and will continue to change in the future so nothing is set in stone.

@tucq88
tucq88 / .csscomb.json
Created October 27, 2017 04:08 — forked from Yimiprod/.csscomb.json
smacss definition for scss-lint and csscomb
{
"exclude": [
".git/**",
"node_modules/**"
],
"remove-empty-rulesets": true,
"always-semicolon": true,
"color-case": "lower",
"block-indent": " ",
"color-shorthand": false,
@tucq88
tucq88 / bash-cheatsheet.sh
Created May 24, 2017 11:02 — forked from LeCoupa/bash-cheatsheet.sh
Bash CheatSheet for UNIX Systems
#!/bin/bash
#####################################################
# Name: Bash CheatSheet for Mac OSX
#
# A little overlook of the Bash basics
#
# Usage:
#
# Author: J. Le Coupanec
# Date: 2014/11/04
@tucq88
tucq88 / pr.md
Created November 25, 2016 02:16 — forked from piscisaureus/pr.md
Checkout github pull requests locally

Locate the section for your github remote in the .git/config file. It looks like this:

[remote "origin"]
	fetch = +refs/heads/*:refs/remotes/origin/*
	url = [email protected]:joyent/node.git

Now add the line fetch = +refs/pull/*/head:refs/remotes/origin/pr/* to this section. Obviously, change the github url to match your project's URL. It ends up looking like this:

@tucq88
tucq88 / gist:1179d101e441824e512ae142b6fbaf6f
Created August 17, 2016 05:52 — forked from prsws/gist:8162386
A Multi-Tenant Strategy using Yii and MySQL

Introduction

This article describes an implementation of multi-tenancy using Yii and MySQL. “Multi-tenancy” is but one (yet crucial) aspect of SaaS applications; refer to the IBM document Convert your web application to a multi-tenant SaaS solution for more information on what else makes a webapp a SaaS application.

Moreover, there are three main architectures for multi-tenant databases: separate database, separate schemas and a single database. Refer to the Microsoft document Multi-Tenant Data Architecture for more information.

As MySQL doesn’t have schemas (at least the same way MS SQL Server and Oracle do) the only choices are a separate database for each tenant and single database with “commingled” tenant data. SaaS applications with a relatively small number of tenants can be easily managed with a database for each one, but for large numbers of tenants its

@tucq88
tucq88 / Git branch bash autocomplete *with aliases*
Last active February 20, 2017 09:08 — forked from JuggoPop/Git branch bash autocomplete *with aliases*
Git branch bash autocomplete *with aliases* (add to .bash_profile)
# To Setup:
# 1) Save the .git-completion.bash file found here:
# https://github.com/git/git/blob/master/contrib/completion/git-completion.bash
# 2) Add the following lines to your .bash_profile, be sure to reload (for example: source ~/.bash_profile) for the changes to take effect:
#TODO Make bash dir and go to
mkdir ~/.bash && cd ~/.bash
#TODO CURL to get the file
curl -O https://raw.githubusercontent.com/git/git/master/contrib/completion/git-completion.bash
@tucq88
tucq88 / ISC.md
Created May 17, 2016 03:55 — forked from indexzero/ISC.md
ISC vs. MIT

Copyright (c) 4-digit year, Company or Person's Name

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.

Source: http://opensource.org/licenses/ISC