Skip to content

Instantly share code, notes, and snippets.

@vocolboy
vocolboy / Update_multiple_records.md
Last active January 3, 2018 10:20
Update multiple records
  1. sqlfiddle - use case
UPDATE videos
SET views = CASE "id" 
                WHEN '13d2b117-15d7-4168-a545-a202206f149a' THEN 1 
                WHEN 'a8cf98c6-0413-4306-aabd-058db68097f9' THEN 2 
            END
WHERE "id" IN('13d2b117-15d7-4168-a545-a202206f149a', 'a8cf98c6-0413-4306-aabd-058db68097f9')
@vocolboy
vocolboy / install.md
Last active November 15, 2020 09:29
pretty zsh ( iTerm2 , Zsh , Oh My Zsh , Powerlevel9K )

Installation

iTerm2

brew tap caskroom/cask
brew cask instal iterm2

Zsh

This solution worked for me, but it might depend on the application in question. I tried it with a 3rd party app called "Burn" and it worked.
Go to your applications folder and right click (control-click) on the app you wanna hide from the dock.
Click on Show contents. You should now be able to see "inside" the app's files.
Open the Info.plist file in the Contents folder with TextEdit (right click -> "Open with...")
Go to the very bottom of the file and find the last two lines which should say:
@vocolboy
vocolboy / LogQueryExecuted.php
Last active November 16, 2018 10:09
Laravel5.7 Log Query Executed
#Put It In AppServiceProvider.php
<?php
use Illuminate\Database\Events\QueryExecuted;
use DB;
use Log;
...
public function boot()
{
@vocolboy
vocolboy / DropboxPaper.md
Last active March 12, 2019 15:08
Remove yourself from a shared document in dropbox paper | 主動離開dropbox paper共享文件
  1. Go to curret paper
  2. Open your "Chrome debug tool" via Netwrok tab
  3. Click right top button "Invite"
  4. You should see an request called "mark-user-active"
  5. Find Params and replace to curl command

Replace Below Params and WE FINALLY LEFT!!