Skip to content

Instantly share code, notes, and snippets.

View lzcabrera's full-sized avatar
:octocat:

Laura Cabrera lzcabrera

:octocat:
  • Victoria, BC
  • 07:02 (UTC -07:00)
View GitHub Profile
@lzcabrera
lzcabrera / httpd.conf
Created December 7, 2011 09:50
deploying 2 virtual hosts root using Apache
<VirtualHost *:80>
ServerAdmin contact@domain1.com
DocumentRoot /opt/railsapps/testone/public
ServerName domain1.com
ServerAlias domain1.com
ErrorLog logs/domain1-error_log
CustomLog logs/domain1-access_log common
<Directory /opt/railsapps/testone/public>
Allow from all
Options -MultiViews
@lzcabrera
lzcabrera / subcategories.xml
Created January 23, 2012 04:41
Extracting Unique Values with XSL By Dave Pawson as found on http://www.bernzilla.com/item.php?id=333 (Bernie Zimmermann's Blog)
<Main>
<Level>
<Category id="a">
<SubCategory>one</SubCategory>
<SubCategory>two</SubCategory>
<SubCategory>three</SubCategory>
</Category>
<Category id="b">
<SubCategory>one</SubCategory>
@lzcabrera
lzcabrera / amplitude.js
Created March 4, 2012 01:09
Amplitude of An Array
var A = [-100, 2, 44, 0, 39, 5000010];
function amplitude(A){
var n = A.length;
var i;
var min_val;
var max_val;
var allowed_min = 0;
var allowed_max = 5000000;
var max_elements = 3;
@lzcabrera
lzcabrera / browserdetect.js
Created March 27, 2012 04:17 — forked from grigs/browserdetect.js
Apple's Browser Detection Script - prettified from http://images.apple.com/global/scripts/browserdetect.js
if (typeof (AC) === "undefined") {
AC = {}
}
AC.Detector = {
getAgent: function () {
return navigator.userAgent.toLowerCase()
},
isMac: function (c) {
var d = c || this.getAgent();
return !!d.match(/mac/i)
@lzcabrera
lzcabrera / debugging-foundation-zurb.html
Last active February 13, 2017 14:03
debugging foundation zurb snippet
<!-- begin: for debugging only -->
<div id="fqv" style="position:fixed;top:4px;left:4px;z-index:999;color:#fff;">
<p style="font-size:12px;background:rgba(0,0,0,0.75);padding:5px;margin-bottom:1px;line-height:1.2;">
<span class="left">Media:</span>
<span style="font-weight:bold;" class="show-for-xlarge">Extra Large</span><span style="font-weight:bold;" class="show-for-large">Large</span>
<span style="font-weight:bold;" class="show-for-medium">Medium</span>
<span style="font-weight:bold;" class="show-for-small">Small</span>
<span style="font-weight:bold;" class="show-for-landscape">Landscape</span>
<span style="font-weight:bold;" class="show-for-portrait">Portrait</span>
<span style="font-weight:bold;" class="show-for-touch">Touch</span>
@lzcabrera
lzcabrera / progressive-enhancement.js
Created January 1, 2013 00:51
javascript to enhance desktop experience on resize
$(window).load(function() {
var $win = $(window);
function update () {
if($win.width > 768){
}else{
}
@lzcabrera
lzcabrera / snippet.html
Last active December 14, 2015 09:09
snippet to display responsive width
<div id="fqv" style="position:fixed;top:4px;left:4px;z-index:999;color:#fff;">
<p style="font-size:12px;background:rgba(0,0,0,0.75);padding:5px;margin-bottom:1px;line-height:1.2;">
<span id="window-width"></span>
</p>
</div>
@lzcabrera
lzcabrera / new-mysql-db
Created June 4, 2013 23:03
Commands needed to create a new username and database in MySQL.
mysql -u adminusername -p
CREATE USER 'username'@'localhost' IDENTIFIED BY 'mypass';
CREATE DATABASE databasename;
GRANT ALL PRIVILEGES ON databasename.* TO "username"@"localhost" IDENTIFIED BY "password";
FLUSH PRIVILEGES;
EXIT;
@lzcabrera
lzcabrera / node.js install
Created July 17, 2013 19:04
Setup node.js in Ubuntu
sudo apt-get update
# Install a special package
sudo apt-get install -y python-software-properties python g++ make # Add a new repository for apt-get to search
sudo add-apt-repository ppa:chris-lea/node.js
# Update apt-get’s knowledge of which packages are where
sudo apt-get update
# Now install nodejs and npm

Bearded's Hourly Contract

Date: [[Date of Document]] Between [Our Company] and [Your Company]

Summary

We’re not big on formality, but sometimes it’s best to have a few simple things written down so that we’re all on the same page. In this contract you won’t find complicated legal terms or large passages of unreadable text. We have no desire to trick you into signing something that you might later regret. We do want what’s best for the safety of both parties, now and in the future.