Skip to content

Instantly share code, notes, and snippets.

View leo424y's full-sized avatar

Fly Chang leo424y

View GitHub Profile
@taichunmin
taichunmin / COSCUP2016_slides.md
Last active May 21, 2017 12:01
COSCUP 2016 Workshop: 用 Docker 架設班級 git-it 練習環境,投影片使用 Marp 產生。

用 Docker 架設

班級 git-it 練習環境

By 和風信使 ( @taichunmin )

@dvreed77
dvreed77 / index.html
Created August 1, 2016 18:59
Copy an image to clipboard
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Document</title>
</head>
<body>
<p>
<textarea class="js-copytextarea">Hello I'm some text</textarea>
@statianzo
statianzo / current.js
Last active August 30, 2016 13:47
unknown props warning
const ContactBadge = (props) => (
<div className='Badge' {...props}>
<div>{props.user.name}</div>
<div>{props.contactMethod.type}</div>
</div>
);
export default connect((state, {userId, contactMethodId}) => ({
user: selectUser(state, userId),
contactMethod: selectContactMethod(state, contactMethodId)
@ColCh
ColCh / README.md
Last active April 5, 2022 12:06
Create merge request on Gitlab in command line for current branch

Gitlab merge request script

Creates merge request on Gitlab for you

Installation

Download it, add executable perms and place into PATH:

# Place it into ~/.bin
mkdir ~/.bin
@davidderus
davidderus / .dockerignore
Last active March 3, 2024 10:15
Docker + Rails + Puma + Postgres + Nginx
.git
.gitignore
/doc
.yardoc
coverage
jsdoc
/tmp
/log
Dockerfile
Dockerfile.prod
@jarretmoses
jarretmoses / React Native Clear Cache
Last active April 23, 2025 11:20
Clearing the Cache of your React Native Project
RN < 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.50 - watchman watch-del-all && rm -rf $TMPDIR/react-native-packager-cache-* && rm -rf $TMPDIR/metro-bundler-cache-* && rm -rf node_modules/ && npm cache clean && npm install && npm start -- --reset-cache
RN >= 0.63 - watchman watch-del-all && rm -rf node_modules && npm install && rm -rf /tmp/metro-* && npm run start --reset-cache
npm >= 5 - watchman watch-del-all && rm -rf $TMPDIR/react-* && rm -rf node_modules/ && npm cache verify && npm install && npm start -- --reset-cache
Windows - del %appdata%\Temp\react-native-* & cd android & gradlew clean & cd .. & del node_modules/ & npm cache clean --force & npm install & npm start -- --reset-cache
@noelboss
noelboss / git-deployment.md
Last active August 12, 2025 18:16
Simple automated GIT Deployment using Hooks

Simple automated GIT Deployment using GIT Hooks

Here are the simple steps needed to create a deployment from your local GIT repository to a server based on this in-depth tutorial.

How it works

You are developing in a working-copy on your local machine, lets say on the master branch. Most of the time, people would push code to a remote server like github.com or gitlab.com and pull or export it to a production server. Or you use a service like deepl.io to act upon a Web-Hook that's triggered that service.

@gunjanpatel
gunjanpatel / revert-a-commit.md
Last active September 20, 2025 22:27
Git HowTo: revert a commit already pushed to a remote repository

Revert the full commit

Sometimes you may want to undo a whole commit with all changes. Instead of going through all the changes manually, you can simply tell git to revert a commit, which does not even have to be the last one. Reverting a commit means to create a new commit that undoes all changes that were made in the bad commit. Just like above, the bad commit remains there, but it no longer affects the the current master and any future commits on top of it.

git revert {commit_id}

About History Rewriting

Delete the last commit

Deleting the last commit is the easiest case. Let's say we have a remote origin with branch master that currently points to commit dd61ab32. We want to remove the top commit. Translated to git terminology, we want to force the master branch of the origin remote repository to the parent of dd61ab32:

那麼大我退休之前的工作幾個嘛一個是就是所謂的護送呃空間設計一個人謝謝。 選那個比較謝謝關于謝謝想象權的設計費。 那你當然還需要等問題可惜氣息絕大部分工作不是在人體上面。 對然後我在蘋果的話是計算語言學能那個同樣也牽涉到人一個絕大部分用的是余名學生。 對然後所以其實還蠻廣德只能說呃因為就是所謂阮體系電腦是心靈的腳踏車嘛就是說你不管要要去哪裡軟體總是可以幫你省一起。 然後給讓你接觸了更多人但是那就事情本身其實不專注在人體本身上理性。 嗯。 謝謝。 我想請教向下比如說這所謂的開源軟體概念對呃您的看法又是什麼。 呃我一直在好奇只說開源開源這個跟一般的軟體公司不一樣謝謝。

@billy3321
billy3321 / Markdown Cheatsheet 中文版.md
Last active August 23, 2025 10:27
Markdown Cheatsheet 中文版