Skip to content

Instantly share code, notes, and snippets.

View theWhiteFox's full-sized avatar
👑
Crafting Web Apps - Continuous Learning

Stephen ♔ Ó Conchubhair theWhiteFox

👑
Crafting Web Apps - Continuous Learning
View GitHub Profile
@theWhiteFox
theWhiteFox / Contact page
Created July 9, 2014 12:36
Contact page HTML5 - PDO - MySQL - localhost - WAMP
<article id = "page-contact" class="page-round">
<!-- Contact -->
<header>
<h2>Contact</h2>
</header>
<p>Email stevo.joc@gmail.com</p>
<?php
if (isset($_POST['submit'])) {
$dbh = new PDO('mysql:host=localhost;dbname=register', 'root', '', array(
PDO::ATTR_ERRMODE => PDO::ERRMODE_EXCEPTION,
<!DOCTYPE html>
<!-- @ Stephen O'Connor -->
<html lang="en">
<head>
<title>TODO supply a title</title>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body>
<header>
@theWhiteFox
theWhiteFox / gist:61e83752956f00dc7591
Last active August 29, 2015 14:13
google fonts and reset minified
/* Font & Reset */
html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abbr,acronym,address,big,cite,code,del,dfn,em,img,ins,kbd,q,s,samp,small,strike,strong,sub,sup,tt,var,b,u,i,center,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,embed,figure,figcaption,footer,header,hgroup,menu,nav,output,ruby,section,summary,time,mark,audio,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:before,blockquote:after,q:before,q:after{content:'';content:none}table{border-collapse:collapse;border-spacing:0}
h1{font-family: 'Roboto', sans-serif;font-size: 2em}
p{font-family: 'Droid Sans', sans-serif;}
<link href='http://fonts.googleapis.com/css?family=Droid+Sans|Roboto' rel='stylesheet' type='text/css'>
@theWhiteFox
theWhiteFox / Vim commands
Last active August 29, 2015 14:15
Learning Vim commands
Cut and paste:
Position the cursor where you want to begin cutting.
Press v to select characters (or uppercase V to select whole lines).
Move the cursor to the end of what you want to cut.
Press d to cut (or y to copy).
Move to where you would like to paste.
Press P to paste before the cursor, or p to paste after.
Copy and paste is performed with the same steps except for step 4 where you would press y instead of d:
@theWhiteFox
theWhiteFox / JS Return
Created March 11, 2015 11:56
JS Return
Returns an expression
Sort of optional
Only in function body
Return sends something back to the caller
Stops execution of the function
More than one
Can be anything or nothing
Warning Auto semicolon insertion
@theWhiteFox
theWhiteFox / NetBeans .gitignore
Created March 26, 2015 08:54
NetBeans .gitignore all files
### NetBeans ###
nbproject/*
build/
nbbuild/
dist/
nbdist/
nbactions.xml
nb-configuration.xml
.nb-gradle/
@theWhiteFox
theWhiteFox / VS 2013 gitignore
Created April 21, 2015 09:48
Visual Studio 2013 gitignore asp.net files
# .gitignore for ASP.NET MVC / Windows Azure development
# Original file: https://gist.github.com/3318347 by @codingoutloud
## Github doc on ignoring files: https://help.github.com/articles/ignoring-files
## The man page for .gitignore (referenced by github): http://man.cx/gitignore
## Of possible interest (can be complex): https://github.com/github/gitignore
# Troubleshooting
# 1. If you add a .gitignore file to an existing repo (or significantly change one), you may want
# to force it to act as though the new/updated .gitignore was in force the whole time.
## http://stackoverflow.com/questions/1139762/gitignore-file-not-ignoring
:+1:
:-1:
:airplane:
:art:
:bear:
:beer:
:bike:
:bomb:
:book:
:bulb:
@theWhiteFox
theWhiteFox / SolarizedPalette.css
Created September 27, 2015 13:34
Solarized Palette
/* Solarized Palette - http://ethanschoonover.com/solarized ---------
lightgray : #819090;
gray : #708284;
mediumgray : #536870;
darkgray : #475B62;
darkblue : #0A2933;
darkerblue : #042029;
paleryellow : #FCF4DC;
paleyellow : #EAE3CB;
yellow : #A57706;
@theWhiteFox
theWhiteFox / Javac
Created March 10, 2016 12:31
Javac
Javac *.java // compile all java files