Skip to content

Instantly share code, notes, and snippets.

View chaiwei's full-sized avatar
🎯
Focusing

Chaiwei chaiwei

🎯
Focusing
  • Malaysia / Australia
View GitHub Profile
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@chaiwei
chaiwei / git.md
Last active February 19, 2021 04:56
Commands
Example infrastructure outage incident report
Friday, May 13, 2077
By the Example Security Team
Earlier this week we experienced an outage in our API infrastructure. Today we’re providing an incident report that details the nature of the outage and our response.
The following is the incident report for the Example Security outage that occurred on April 30, 2077. We understand this service issue has impacted our valued developers and users, and we apologize to everyone who was affected.
@chaiwei
chaiwei / general.js
Last active October 12, 2020 08:02
Framework7
// Example routes define in src/js/routes.js
import InitialPage from '../pages/initial.vue';
var routes = [
{
path: '/',
component: InitialPage,
},
{
path: '/dashboard/:tab/',
async(routeTo, routeFrom, resolve, reject) {
@chaiwei
chaiwei / shortcuts.md
Last active September 28, 2020 14:51
MacOS

Frequent Use MacOS Shortcuts

Hide Current Application

⌘ Command + H

Hide All Window

@chaiwei
chaiwei / DBBuilder.php
Last active December 31, 2023 12:20
Laravel
<?php
$users = DB::table('users')->get();
foreach ($users as $user) {
echo $user->name;
}
$user = DB::table('users')->where('name', 'John')->first();
$email = DB::table('users')->where('name', 'John')->value('email');