Skip to content

Instantly share code, notes, and snippets.

View davecan's full-sized avatar

David Cantrell davecan

View GitHub Profile
@davecan
davecan / oracle_1Z0-061_notes.md
Created December 24, 2015 04:02 — forked from switchtrue/oracle_1Z0-061_notes.md
Notes for taking the 1Z0-061 Oracle Exam - Oracle Database 12c: SQL Fundamentals

Introduction

I have compiled these notes whilst revising for the Oracle 1Z0-061 Exam - Oracle Database 12c: SQL Fundamentals. They should also be relevant to the 1Z0-051 - Oracle Database 11g: SQL Fundamentals exam. Revision was most conducted using the excellent and highly recommended "OCA Oracle Database 12c SQL Fundamentals I Exam Guide" by Roopesh Ramklass.

I have aimed to include include in these notes common "gotchas" and easy to forget functionality rather than documenting everything required for the exam. This can then be used as a quick refresher before walking into the exam.

The content is broken up into sections with each heading mapping to the relevant [Oracle 1Z0-061 exam topics](https://edu

@davecan
davecan / gist:b26aaeb79678c2a8b924
Created February 3, 2016 17:37
Markdown cheat sheet

Header 1

Header 2

Header 3 ### (Hashes on right are optional)

Header 4

Header 5

Markdown plus h2 with a custom ID ## {#id-goes-here}

Link back to H2

This is a paragraph, which is text surrounded by whitespace. Paragraphs can be on one

@davecan
davecan / ef6_deployment_scripts.md
Last active February 3, 2016 17:40
How to script migrations and seeding to generate a final SQL script for execution in the deployment environment (test/prod/etc) without running Seed() method

Targeted deployments with Entity Framework Migrations

This is a note collecting the basic processes of deploying EF6 migrations to other servers (such as test & prod) without running the Seed method in Configuration.cs. It is often the case when deploying to test & prod environments that the DBAs will want to review SQL before it is executed in the target environment. In such a case the Seed method is not run, something that is not often clarified in online tutorials that imply the Seed method will always be available. This requires a completely different approach to seeding data.

Strategy

@davecan
davecan / GetDropboxPath.ps1
Created March 23, 2016 23:36
Simple powershell function that returns the path to a local personal dropbox instance.
function GetDropboxPath
{
$jsonPartialPath = "\Dropbox\info.json"
$jsonAppdataPath = $env:APPDATA + $jsonPartialPath
$jsonLocalAppdataPath = $env:LOCALAPPDATA + $jsonPartialPath
if (test-path $jsonAppdataPath)
{
$jsonPath = $jsonAppdataPath
}
@davecan
davecan / git-dropbox-remote.md
Last active March 30, 2016 03:44 — forked from edavis/git-dropbox-remote.md
Use Dropbox as a git remote

Intro

Every developer eventually faces the challenge of managing their personal "dotfiles" among the different machines he or she uses.

This post details how I tackled this issue by using Dropbox as a git remote while avoiding the pitfalls of storing the repository itself in Dropbox.

In the beginning

@davecan
davecan / wsl_ubuntu_webpack_error_fix
Created November 20, 2017 19:26
Windows WSL Ubuntu npm webpack CSS error fix
// When using webpack under WSL Ubuntu the following error will be generated during "npm start":
//
// Error: EINVAL: invalid argument, "index.css" (or similar to this)
//
// This is apparently a bug in how Microsoft implemented the Ubuntu subsystem.
//
// The solution is to add the below code to the very top of the webpack config file. (above the imports is fine)
//
// See: https://github.com/webpack-contrib/extract-text-webpack-plugin/issues/440
@davecan
davecan / System Design.md
Created January 6, 2019 02:16 — forked from vasanthk/System Design.md
System Design Cheatsheet

System Design Cheatsheet

Picking the right architecture = Picking the right battles + Managing trade-offs

Basic Steps

  1. Clarify and agree on the scope of the system
  • User cases (description of sequences of events that, taken together, lead to a system doing something useful)
    • Who is going to use it?
    • How are they going to use it?

Watch this: https://www.youtube.com/watch?v=dIFKmJ4wufc

  • Set up lab router -- simple $60 linksys router can work well enough -- run cable from the wifi router to the lab router
  • All devices in the lab go behind the lab router
    • Otherwise can cause DNS/DHCP conflicts & general chaos across the rest of the home network
    • Isolate the lab behind this internal router to avoid conflicts
  • Lab network must be on different subnet than the main home network
    • Because router is for routing between different subnets
    • So if labnet is on same subnet as homenet then router can't route properly
  • If homenet is on NAT network space 192.168.1.x then router's external port must be on the same network, e.g. have IP such as 192.168.1.2

Super simple docker cheatsheet.

Build & deploy an app

First build the image:

docker build -t <desired_image_name> .

Example from when I built a container having a TCP/IP client script and TCP/IP server script, so I wanted a generic name: