Skip to content

Instantly share code, notes, and snippets.

View ushiocheng's full-sized avatar

Clover ushiocheng

  • Santa Clara University
  • Santa Clara, CA, USA
View GitHub Profile
@FiveYellowMice
FiveYellowMice / question-box.php
Created December 30, 2019 13:41
FiveYellowMice 的提问箱
<?php
function return_error($code, $message) {
http_response_code($code);
header('Content-Type: text/plain');
echo $message."\n";
die();
}
if (in_array($_SERVER['REQUEST_METHOD'], ['HEAD', 'GET'])) {
@domenic
domenic / redirecting-github-pages.md
Created February 10, 2017 19:28
Redirecting GitHub pages after a repository move

Redirecting GitHub Pages after a repository move

The problem

You have a repository, call it alice/repo. You would like to transfer it to the user bob, so it will become bob/repo.

However, you make heavy use of the GitHub Pages feature, so that people are often accessing https://alice.github.io/repo/. GitHub will helpfully redirect all of your repository stuff hosted on github.com after the move, but will not redirect the GitHub Pages hosted on github.io.

The solution

@tuxfight3r
tuxfight3r / 01.bash_shortcuts_v2.md
Last active May 4, 2024 16:58
Bash keyboard shortcuts

Bash Shortcuts

visual cheetsheet

Moving

command description
ctrl + a Goto BEGINNING of command line