Skip to content

Instantly share code, notes, and snippets.

@16892434
16892434 / How to Install JDK MacOS Homebrew.md
Created February 4, 2023 13:18 — forked from gwpantazes/How to Install JDK MacOS Homebrew.md
How to install different JDK versions on MacOS with Homebrew
View How to Install JDK MacOS Homebrew.md

How To Install Different JDK Versions on MacOS with Homebrew

Keywords: Java, JDK (Java Development Kit), MacOS, Homebrew, Specific Version

This how-to guide covers how to install different versions of the JDK on MacOS with Homebrew.

Table of Contents

@16892434
16892434 / main.go
Created January 11, 2023 08:06 — forked from daehee/main.go
chromedp - get response headers
View main.go
// https://stackoverflow.com/a/56602780
package main
import (
"context"
"io/ioutil"
"log"
"os"
"time"
View gist:8a143aa5c149e472dc13bc844782ae60
http://www.sohu.com/a/131128039_505813
电商后台设计
本文包括以下几个部分:
电商后台系统概述
电商后台产品设计:商品中心
电商后台产品设计:订单拆单
电商后台产品设计:促销活动解析
电商后台产品设计:优惠券的设计和妙用
@16892434
16892434 / read_gzip_lines.go
Created October 14, 2022 08:55 — forked from lovasoa/read_gzip_lines.go
How to Read Lines from GZIP-Compressed Files in Go
View read_gzip_lines.go
package main
import (
"bufio"
"compress/gzip"
"fmt"
"io"
"log"
"os"
)
@16892434
16892434 / gzipWriter.go
Created October 14, 2022 08:54 — forked from mchirico/gzipWriter.go
Example of writing a gzip file in go (golang). This appends data to the same file every time it is run. It is important to Flush() the data before closing the file.
View gzipWriter.go
/*
This is an example of a golang gzip writer program,
which appends data to a file.
*/
package main
@16892434
16892434 / setcookie.go
Created October 13, 2022 03:03 — forked from NaniteFactory/setcookie.go
chromedp set-cookie example
View setcookie.go
package main
import (
"context"
"fmt"
"log"
"time"
"github.com/chromedp/cdproto/cdp"
"github.com/chromedp/cdproto/network"
@16892434
16892434 / JSONSaveLoad.swift
Created September 9, 2022 07:15 — forked from norsez/JSONSaveLoad.swift
Load and Save JSON objects into a local file (written in Swift)
View JSONSaveLoad.swift
import Foundation
/**
Extension to save/load a JSON object by filename. (".json" extension is assumed and automatically added.)
*/
extension JSONSerialization {
static func loadJSON(withFilename filename: String) throws -> Any? {
let fm = FileManager.default
View git 设置和取消代理
git config --global https.proxy http://127.0.0.1:1080
git config --global https.proxy https://127.0.0.1:1080
git config --global --unset http.proxy
git config --global --unset https.proxy
npm config delete proxy
@16892434
16892434 / xcode-duplicate-line.md
Created September 5, 2022 07:49 — forked from atereshkov/xcode-duplicate-line.md
Xcode 13 duplicate line shortcut (hotkey)
View xcode-duplicate-line.md

Xcode 13 duplicate line shortcut

  1. Run
sudo chmod 666 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources//IDETextKeyBindingSet.plist
sudo chmod 777 /Applications/Xcode.app/Contents/Frameworks/IDEKit.framework/Versions/A/Resources/
@16892434
16892434 / get-latest-tag-on-git.sh
Created August 4, 2022 01:28 — forked from rponte/get-latest-tag-on-git.sh
Getting latest tag on git repository
View get-latest-tag-on-git.sh
# The command finds the most recent tag that is reachable from a commit.
# If the tag points to the commit, then only the tag is shown.
# Otherwise, it suffixes the tag name with the number of additional commits on top of the tagged object
# and the abbreviated object name of the most recent commit.
git describe
# With --abbrev set to 0, the command can be used to find the closest tagname without any suffix:
git describe --abbrev=0
# other examples