Skip to content

Instantly share code, notes, and snippets.

@andyyou
andyyou / gist:3052671
Created Jul 5, 2012
C# Controls abbreviation
View gist:3052671
btn Button chk CheckBox ckl CheckedListBox
cmb ComboBox dtp DateTimePicker lbl Label
llb LinkLabel lst ListBox lvw ListView
mtx MaskedTextBox cdr MonthCalendar icn NotifyIcon
nud NumeircUpDown pic PictureBox prg ProgressBar
rdo RadioButton rtx RichTextBox txt TextBox
tip ToolTip tvw TreeView wbs WebBrowser
容器
flp FlowLayoutPanel grp GroupBox pnl Panel
@andyyou
andyyou / iterm2-solarized.md
Created Sep 30, 2015 — forked from kevin-smets/iterm2-solarized.md
iTerm2 + oh my zsh + solarized + Meslo powerline font (OSX)
@andyyou
andyyou / rails_webpacker_bootstrap_expose_jquery.md
Last active Oct 5, 2021
Rails 5.2 with webpacker, bootstrap, stimulus starter
View rails_webpacker_bootstrap_expose_jquery.md

Rails 5.2 with webpacker, bootstrap, stimulus starter

This gist will collects all issues we solved with Rails 5.2 and Webpacker

Create Project

# Last few parameters(--skip-* part) is only my habbit not actully required
$ rails new  --webpack=stimulus --database=postgresql --skip-coffee --skip-test
@andyyou
andyyou / Markdium-Hack.php
Created Oct 23, 2020
Markdium-Laravel 8 - Integrate Jetstream + Socialite in 30 mins
View Markdium-Hack.php
use App\Http\Controllers\Auth\LoginController;
Route::get('/login/{provider}', [LoginController::class, 'redirectToProvider'])
->name('social.login');
Route::get('/login/{provider}/callback', [LoginController::class, 'handleProviderCallback'])
->name('social.callback');
@andyyou
andyyou / Markdium-Hack.php
Created Oct 23, 2020
Markdium-Laravel 8 - Integrate Jetstream + Socialite in 30 mins
View Markdium-Hack.php
use Illuminate\Database\Eloquent\SoftDeletes;
// ...
// If you want to support verify you can add implements
class User extends Authenticatable
{
use Notifiable;
use SoftDeletes;
// ...
@andyyou
andyyou / Markdium-Hack.php
Last active Oct 28, 2020
Markdium-Laravel 8 - Integrate Jetstream + Socialite in 30 mins
View Markdium-Hack.php
<div>
@php
$providers = [
'google' => [
'bgColor' => '#ec462f',
'icon' => 'fab fa-google',
],
'facebook' => [
'bgColor' => '#1877f2',
'icon' => 'fab fa-facebook-f',
@andyyou
andyyou / Markdium-Hack.php
Last active Oct 28, 2020
Markdium-Laravel 8 - Integrate Jetstream + Socialite in 30 mins
View Markdium-Hack.php
<?php
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Auth\LoginController;
// ...
Route::middleware(['auth:sanctum', 'verified'])->get('/dashboard', function () {
return Inertia\Inertia::render('Dashboard');
})->name('dashboard');
@andyyou
andyyou / Markdium-Hack.php
Last active Oct 28, 2020
Markdium-Laravel 8 - Integrate Jetstream + Socialite in 30 mins
View Markdium-Hack.php
<?php
namespace App\Http\Controllers\Auth;
use App\Http\Controllers\Controller;
use App\Providers\RouteServiceProvider;
use Illuminate\Support\Facades\Auth;
use Illuminate\Http\Request;
use Socialite;
@andyyou
andyyou / Markdium-Shell.sh
Created Oct 23, 2020
Markdium-Laravel 8 - Integrate Jetstream + Socialite in 30 mins
View Markdium-Shell.sh
$ composer require laravel/jetstream
$ php artisan jetstream:install inertia --teams
$ npm install && npm run dev
# (opt) For customize template you should publish these views
$ php artisan vendor:publish --tag=jetstream-views
@andyyou
andyyou / Markdium-Shell.sh
Created Oct 23, 2020
Markdium-Laravel 8 - Integrate Jetstream + Socialite in 30 mins
View Markdium-Shell.sh
$ createdb demo