Skip to content

Instantly share code, notes, and snippets.

View leizmonk's full-sized avatar

Lei Zhao leizmonk

View GitHub Profile
To run a command as administrator (user "root"), use "sudo <command>".
See "man sudo_root" for details.
lei@heckin-chonker:~$ sudo apt-get update
[sudo] password for lei:
Get:1 http://us.archive.ubuntu.com/ubuntu bionic InRelease [242 kB]
Get:2 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Get:3 http://us.archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]
Get:4 http://us.archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]
Get:5 http://us.archive.ubuntu.com/ubuntu bionic/main amd64 Packages [1,019 kB]
@leizmonk
leizmonk / LT pixel.js
Last active June 6, 2017 16:20
LT category browse
// In Petflow/Services/Pages/LandingPageLocator.php <- platform code that returns the listing
public function cmsPage($slug) : array
{
$all_brands = [];
$brands = array_map(function($iteration) use (&$all_brands) {
$all_brands = array_merge($all_brands, $iteration);
}, $this->pages->availableBrands());
$ret = [
'products' => [],
'brands' => $all_brands,
@leizmonk
leizmonk / gist:4771a796e7c5d39c83a8ef4dabb19115
Created January 27, 2017 20:25
list/grid view update pf
- What you should expect to see with each variation:
![screen_shot_2017-01-25_at_1 21 30_pm](https://cloud.githubusercontent.com/assets/3981723/22350187/ce518094-e3e0-11e6-870b-654b5df54b18.png)
- Qubit previews:
- Variation 1: `#smartserve_preview=1&bypass_segments=&etcForceCreative=476234`
- Variation 2: `#smartserve_preview=1&bypass_segments=&etcForceCreative=477039`
- Variation 3: `#smartserve_preview=1&bypass_segments=&etcForceCreative=477040`
- Variation 4: `#smartserve_preview=1&bypass_segments=&etcForceCreative=477045`
- Qubit layer: https://app.qubit.com/p/3972/experiences/85829/editor?vid=476234
- Force variations on PDP: `?list-grid-view-override=` + variation 1-4
@leizmonk
leizmonk / edithost.sh
Created January 18, 2017 20:18
sauce connect tunnel w altered vm host
@echo off
echo 192.33.31.181 www.petflow.com > %temp%\temphosts.txt
type C:\WINDOWS\system32\drivers\etc\hosts >> %temp%\temphosts.txt
copy /Y %temp%\temphosts.txt C:\WINDOWS\system32\drivers\etc\hosts