Skip to content

Instantly share code, notes, and snippets.

@ngobach
ngobach / virtualbox.txt
Created September 12, 2017 16:29
VirtualBox configs for OSX
./VBoxManage.exe modifyvm "Mac" --cpuidset 00000001 000306a9 04100800 7fbae3ff bfebfbff
./VBoxManage.exe setextradata "Mac" "VBoxInternal/Devices/efi/0/Config/DmiSystemProduct" "MacBookPro11,3"
./VBoxManage.exe setextradata "Mac" "VBoxInternal/Devices/efi/0/Config/DmiSystemVersion" "1.0"
./VBoxManage.exe setextradata "Mac" "VBoxInternal/Devices/efi/0/Config/DmiBoardProduct" "Mac-2BD1B31983FE1663"
./VBoxManage.exe setextradata "Mac" "VBoxInternal/Devices/smc/0/Config/DeviceKey" "ourhardworkbythesewordsguardedpleasedontsteal(c)AppleComputerInc"
./VBoxManage.exe setextradata "Mac" "VBoxInternal/Devices/smc/0/Config/GetKeyFromRealSMC" 1
./VBoxManage setextradata "macOS Sierra" "VBoxInternal2/EfiGopMode" 1
1 gives you a resolution of 800×600
2 gives you a resolution of 1024×768
version: "3"
services:
database:
image: mongo:latest
networks:
bachnx:
server:
image: thanbaiks/mp3-server:latest
ports:
- 8000:8000
@ngobach
ngobach / cloudSettings
Last active October 7, 2017 17:15
Visual Studio Code Settings Sync Gist
{"lastUpload":"2017-10-07T17:15:57.765Z","extensionVersion":"v2.8.3"}
@ngobach
ngobach / Fix.MD
Created July 7, 2017 15:52
L2PT/IPSec NAT-T fix for windows

For Windows Vista, 7, 8.x and 10

REG ADD HKLM\SYSTEM\CurrentControlSet\Services\PolicyAgent /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f

For Windows XP ONLY

REG ADD HKLM\SYSTEM\CurrentControlSet\Services\IPSec /v AssumeUDPEncapsulationContextOnSendRule /t REG_DWORD /d 0x2 /f
@ngobach
ngobach / SQL_SERVER_CLEANDB.SQL
Created April 22, 2017 15:41
Completely database cleaning script for M$ SQL Server
/* Drop all non-system stored procs */
DECLARE @name VARCHAR(128)
DECLARE @SQL VARCHAR(254)
SELECT @name = (SELECT TOP 1 [name] FROM sysobjects WHERE [type] = 'P' AND category = 0 ORDER BY [name])
WHILE @name is not null
BEGIN
SELECT @SQL = 'DROP PROCEDURE [dbo].[' + RTRIM(@name) +']'
EXEC (@SQL)
set gfxpayload=text
set ISODIR=/LINUX
set PARAMS=splash
probe -u $LINUX --set=PARTUUID
export ISODIR PARAMS PARTUUID gfxpayload
insmod regexp
for f in ($LINUX)$ISODIR/*.iso; do
regexp -s "1:basename" "$ISODIR/(.*)\$" $f
type="os"
@ngobach
ngobach / optimize-vmware.md
Last active December 15, 2017 14:08 — forked from wpivotto/gist:3993502
Maximize VMWare images performance

optimize-vmware

Insert the following code into the *.VMX file:

sched.mem.pshare.enable = "FALSE"
mainMem.useNamedFile = "FALSE"
prefvmx.minVmMemPct = "100"
prefvmx.useRecommendedLockedMemSize = "TRUE"
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{REQUEST_URI} !^public
RewriteRule ^(.*)$ public/$1 [L]
</IfModule>
{
"bootstrapped": true,
"in_process_packages":
[
],
"installed_packages":
[
"BracketHighlighter",
"DocBlockr",
"Emmet",