Skip to content

Instantly share code, notes, and snippets.

View vocolboy's full-sized avatar
🪄
AI Summoner

voco vocolboy

🪄
AI Summoner
View GitHub Profile
@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!!

@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()
{
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 / 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

@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')
建立一個新的 Provider
<?php
namespace App\Providers;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\ServiceProvider;
@vocolboy
vocolboy / aws pre-sign muilt file
Created July 1, 2017 03:44
aws pre-sign muilt file - with laravel 5.4 & aws-sdk-php-v3
$s3 = \Illuminate\Support\Facades\Storage::disk('s3');
$bucket = 'eatgether';
# Get dir Files
$files = $s3->allFiles('news');
$client = $s3->getDriver()->getAdapter()->getClient();
$expiry = "+10 minutes";
$result = [];
`....```` ` ```` `` .`
.`.````` ` ..
.`` `` .. ..
.` ` `..` -.
`` ` `` `````` ` .`
` ` ```````````` .` `.
` . ``-` .
3340:Buy,1036:Buy,2003:StartHpPot,1027:Buy,1004:Buy,3070:Buy,1037:Buy,3004:Buy,1001:Buy,2003:StopHpPot,3044:Buy,3057:Buy,3101:Buy,3078:Buy,1053:Buy,3144:Buy,1043:Buy,3153:Buy,3006:Buy,3087:Buy,3046:Buy
@vocolboy
vocolboy / CountryCodes.sql
Created October 17, 2016 10:38
Facebook Account Kit Supported SMS Country Codes
-- ----------------------------
-- Table structure for country_codes
-- ----------------------------
DROP TABLE IF EXISTS "public"."country_codes";
CREATE TABLE "public"."country_codes" (
"id" int4 NOT NULL DEFAULT nextval('country_codes_id_seq'::regclass),
"country" varchar(255) NOT NULL COLLATE "default",
"dialing_code" int4 NOT NULL,
"country_code" varchar(255) NOT NULL COLLATE "default"
)