Skip to content

Instantly share code, notes, and snippets.

@qwfys
qwfys / macos_on_ubuntu.md
Created July 5, 2020 17:38 — forked from tieubao/macos_on_ubuntu.md
Install macOS in a VirtualBox machine on Ubuntu

Important: I'm writing this when the last version of macOS (and the one I have installed) is Mojave. There is already a script which installs Mojave in a virtual machine here https://github.com/img2tab/okiomov. But if you are curios how to do everything manually to install High Sierra, then this guide may be useful.

After reading a few articles I ended up with these steps:

  1. On macOS, download the High Sierra installer (even if you have Mojave installed): https://itunes.apple.com/us/app/macos-high-sierra/id1246284741?ls=1&mt=12
  2. If the High Sierra Installer starts, quit it.
  3. Open "Disk Utility".
  4. Click on "File" > "New Image" > "Blank image...". Or just press cmd+N.
@tieubao
tieubao / macos_on_ubuntu.md
Created April 7, 2019 17:25 — forked from stefanocoding/macos_on_ubuntu.md
Install macOS in a VirtualBox machine on Ubuntu

Important: I'm writing this when the last version of macOS (and the one I have installed) is Mojave. There is already a script which installs Mojave in a virtual machine here https://github.com/img2tab/okiomov. But if you are curios how to do everything manually to install High Sierra, then this guide may be useful.

After reading a few articles I ended up with these steps:

  1. On macOS, download the High Sierra installer (even if you have Mojave installed): https://itunes.apple.com/us/app/macos-high-sierra/id1246284741?ls=1&mt=12
  2. If the High Sierra Installer starts, quit it.
  3. Open "Disk Utility".
  4. Click on "File" > "New Image" > "Blank image...". Or just press cmd+N.
@smurugap
smurugap / virt-install
Created March 11, 2018 21:04
Virt Install to start a VM with macvtap interface
virt-install \
--name=centos-compute-$i \
--ram=32768 \
--vcpus=16 \
--cpu host-model-only \
--os-type linux \
--os-variant centos7.0 \
--import \
--disk path=/var/lib/libvirt/images/centos74-compute-$i.qcow2,bus=virtio,cache=none,format=qcow2,bus=virtio \
--network type=direct,source=enp6s0f0,source_mode=bridge,model=virtio \
Run powershell as administrator:
-posh-gvm installation:
Execute (new-object Net.WebClient).DownloadString('https://raw.githubusercontent.com/flofreud/posh-gvm/master/GetPoshGvm.ps1') | iex
Execute Import-Module posh-gvm
// if you have problems with execution policy (https://msdn.microsoft.com/powershell/reference/5.1/Microsoft.PowerShell.Core/about/about_Execution_Policies)
// Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
// later return to old value
Execute gvm help to get started!
-sdkman installation:
@noodles-v6
noodles-v6 / JdbcType.java
Created April 12, 2016 07:37
Mybatis.JdbcType
/**
* Copyright 2009-2015 the original author or authors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
@denji
denji / golang-tls.md
Last active July 1, 2024 05:41 — forked from spikebike/client.go
Simple Golang HTTPS/TLS Examples

Moved to git repository: https://github.com/denji/golang-tls

Generate private key (.key)
# Key considerations for algorithm "RSA" ≥ 2048-bit
openssl genrsa -out server.key 2048

# Key considerations for algorithm "ECDSA" ≥ secp384r1
# List ECDSA the supported curves (openssl ecparam -list_curves)
@stefanbirkner
stefanbirkner / blabla.md
Created October 19, 2014 17:29
Readme of semantic wrapper.

Semantic Wrapper

Generates classes that wrap other classes. Such wrapper classes can be used for named parameters in order to write better code.

Installation

The Semantic Wrapper Maven plugin is available from Maven Central.

@nocnokneo
nocnokneo / update-oracle-java-alternative.sh
Last active December 11, 2020 03:34
update-oracle-java-alternative.sh
#!/bin/bash
set -e
script_name=$(basename "$0")
print_usage()
{
cat <<EOF
Usage: ${script_name} install ORACLE_JAVA_INSTALL_DIR [PRIORITY]
@stefanbirkner
stefanbirkner / nexus-server.sh
Created June 8, 2012 14:02
Installing a Nexus server
#!/bin/bash
#install Java 7
add-apt-repository -y ppa:webupd8team/java
apt-get -y update
apt-get -y install oracle-java7-installer
#install tomcat, which uses Java 7
apt-get -y install tomcat7
sed -i 's/#JAVA_HOME/JAVA_HOME/' /etc/default/tomcat7