Skip to content

Instantly share code, notes, and snippets.

View DanielChuDC's full-sized avatar
🎯
Focusing

danielchu DanielChuDC

🎯
Focusing
  • singapore
View GitHub Profile
@DanielChuDC
DanielChuDC / vagrant virtualbox vm to vmwarefusion.md
Created March 27, 2020 07:54 — forked from biophonc/vagrant virtualbox vm to vmwarefusion.md
Migrate Vagrant VirtualBox VM to VMware Fusion

Migrate Vagrant VirtualBox VM to VMware Fusion

Notes:

  • Unfortunately the process is not as simple as I'd have expected it, that's why I wrote this little step-by-step instruction.
  • My setup is/was:
    • OSX 10.9.4
    • VirtualBox 4.3.12
    • VMware Fusion 6.0.4
    • OS as VM to migrate: Ubuntu 10.04.4 LTS
@DanielChuDC
DanielChuDC / VMwareFusion_Export_ovf.txt
Created March 28, 2020 03:48 — forked from xl7dev/VMwareFusion_Export_ovf.txt
HowTo Export a VM in OVA format in VMware Fusion for OS X
> cd /Applications/VMware Fusion.app/Contents/Library/VMware OVF Tool
> ./ovftool --acceptAllEulas /Users/marco/Documents/Virtual\ Machines.localized/Windows\ 8.1\ x64.vmwarevm/Windows\ 8.1\ x64.vmx /Users/marco/Desktop/Win81.ova
@DanielChuDC
DanielChuDC / .bash_aliases
Created May 4, 2020 14:58 — forked from vratiu/.bash_aliases
Git shell coloring
# Customize BASH PS1 prompt to show current GIT repository and branch.
# by Mike Stewart - http://MediaDoneRight.com
# SETUP CONSTANTS
# Bunch-o-predefined colors. Makes reading code easier than escape sequences.
# I don't remember where I found this. o_O
# Reset
Color_Off="\[\033[0m\]" # Text Reset
@DanielChuDC
DanielChuDC / lvm.sh
Created May 10, 2020 01:38 — forked from jchodakowski/lvm.sh
Complex filesystem shell script
#!/bin/sh
case "$1" in
# update the file 'partman-base.postinst' with our filesystem "installer"
installer)
#sed -i 's/partman/\/tmp\/lvm.sh partman/' /var/lib/dpkg/info/partman-base.postinst
sed -i 's/partman/\/tmp\/lvm.sh destroy; \/tmp\/lvm.sh partman/' /var/lib/dpkg/info/partman-base.postinst
logger -t lvm.sh modified partman-base.postinst
;;
@DanielChuDC
DanielChuDC / app.e2e-spec.ts
Created July 21, 2020 01:16
Angular 10 Protractor function
import { AppPage } from './app.po';
import { browser, logging } from 'protractor';
describe('workspace-project App', () => {
let page: AppPage;
beforeEach(() => {
page = new AppPage();
});
@DanielChuDC
DanielChuDC / basic.md
Created July 24, 2020 01:48 — forked from zenorocha/basic.md
New Firebase Auth vs Old Firebase Auth
@DanielChuDC
DanielChuDC / auth.service.ts
Created July 24, 2020 12:34 — forked from codediodeio/auth.service.ts
Angular4 Firebase authentication service using OAuth, Anonymous, and Email/Password. Designed specifically for changes introduced in AngularFire2 4.0.0
import { Injectable } from '@angular/core';
import { AngularFireDatabaseModule, AngularFireDatabase, FirebaseListObservable } from 'angularfire2/database';
import { AngularFireAuth } from 'angularfire2/auth';
import { Router } from "@angular/router";
import * as firebase from 'firebase';
@Injectable()
export class AuthService {
@DanielChuDC
DanielChuDC / poc.html
Created January 20, 2021 05:03 — forked from kenrick95/poc.html
Handles Play/Pause Media Key
<!DOCTYPE html>
<html lang="en" style="width: 100%; height: 100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PoC</title>
</head>
<body style="width: 100%; height: 100%;">
<audio
id="player"
@DanielChuDC
DanielChuDC / poc.html
Created January 20, 2021 05:03 — forked from kenrick95/poc.html
Handles Play/Pause Media Key
<!DOCTYPE html>
<html lang="en" style="width: 100%; height: 100%;">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>PoC</title>
</head>
<body style="width: 100%; height: 100%;">
<audio
id="player"
import 'package:flutter/material.dart';
@immutable
class ClipShadowPath extends StatelessWidget {
final Shadow shadow;
final CustomClipper<Path> clipper;
final Widget child;
ClipShadowPath({
@required this.shadow,