Skip to content

Instantly share code, notes, and snippets.

View eirture's full-sized avatar

Jie Liu eirture

  • Qiniu Cloud
  • Hangzhou, China
  • 04:47 (UTC +08:00)
View GitHub Profile
@eirture
eirture / uninstall-oracle-java.sh
Created June 12, 2020 06:44
uninstall oracle jdk
#!/usr/bin/env bash
sudo rm -fr /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin /Library/PreferencePanes/JavaControlPanel.prefPane ~/Library/Application\ Support/Oracle/Java
@eirture
eirture / quicksort-and-binary-search.py
Created November 16, 2018 02:57
quicksort by Python
#!/usr/bin/env python
# coding=utf-8
import random
def sort(a, low, height):
i = a[height]
while low < height:
while low < height and a[low] <= i:
@eirture
eirture / sierra-virtualbox-install.md
Created November 14, 2017 03:19 — forked from arobb/sierra-virtualbox-install.md
Install macOS Sierra in VirtualBox on macOS host

Step 1 (Creating a bootable macOS Sierra ISO for VirtualBox):

  1. hdiutil attach /Applications/Install\ macOS\ Sierra\ Public\ Beta.app/Contents/SharedSupport/InstallESD.dmg -noverify -nobrowse -mountpoint /Volumes/install_app
  2. hdiutil create -o /tmp/Sierra.cdr -size 7316m -layout SPUD -fs HFS+J
  3. hdiutil attach /tmp/Sierra.cdr.dmg -noverify -nobrowse -mountpoint /Volumes/install_build
  4. asr restore -source /Volumes/install_app/BaseSystem.dmg -target /Volumes/install_build -noprompt -noverify -erase
  5. rm /Volumes/OS\ X\ Base\ System/System/Installation/Packages
  6. cp -rp /Volumes/install_app/Packages /Volumes/OS\ X\ Base\ System/System/Installation/
  7. cp -rp /Volumes/install_app/BaseSystem.chunklist /Volumes/OS\ X\ Base\ System/BaseSystem.chunklist
@eirture
eirture / FruitComboApplication.java
Created July 28, 2017 11:00 — forked from jewelsea/FruitComboApplication.java
JavaFX fxml combo box selection demonstration app
package fruit;
import java.io.IOException;
import java.net.URL;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Scene;
import javafx.scene.image.Image;
import javafx.scene.layout.AnchorPane;
import javafx.stage.Stage;