Skip to content

Instantly share code, notes, and snippets.

View susanBuck's full-sized avatar

Susan Buck susanBuck

View GitHub Profile
@susanBuck
susanBuck / sessions.php
Created February 21, 2014 12:19
Sessions example
/*-------------------------------------------------------------------------------------------------
Set session helper
-------------------------------------------------------------------------------------------------*/
public static function set_session($key,$value = NULL) {
$_SESSION[$key] = $value;
}
/*-------------------------------------------------------------------------------------------------
Get session helper
@susanBuck
susanBuck / gist:9240424
Created February 26, 2014 22:48
Remove WWW from urls
RewriteEngine On
# Remove www from host (for both http and https)
RewriteCond %{HTTP_HOST} ^www\.(.+)
RewriteCond %{HTTPS}s/%1 ^(on(s)|offs)/(.+)
RewriteRule ^ http%2://%3%{REQUEST_URI} [L,R=301]
@susanBuck
susanBuck / gitslides.md
Last active August 29, 2015 13:58
Git Slides

Git Slides

Generate a responsive slideshow in your browser ala Markdown code in Github.

You can load your slide show from the following two sources:

Option 1: Load from Gist

  • Gist method: http://gitslides.com/gist/{gist_id}
  • Example: http://gitslides.com/gist/9928798

Git Slides Demo

This slideshow was generated from this Gist.

Proceed to the next slide with the right arrow key

Code Test

Hello World
@susanBuck
susanBuck / gist:10445342
Created April 11, 2014 06:58
Calculator planning session
1. Build calculator
#wrapper
#display / #header / #output
.buttons
2. CSS Style to look like a calc.
3. JS
a. click listeners for the buttons
## Slide 1
FOOFIE
## Slide 2
bobaosdfbasod
@susanBuck
susanBuck / grace-hopper.md
Created May 2, 2014 07:15
Grace Hopper Demo for GitViewer.com

Grace Hopper

Bio

Grace Murray Hopper (December 9, 1906 – January 1, 1992) was an American computer scientist and United States Navy rear admiral.[1] A pioneer in the field, she was one of the first programmers of the Harvard Mark I computer, and developed the first compiler for a computer programming language.

Nickname

Amazing Grace

@susanBuck
susanBuck / php.ini
Last active August 29, 2015 14:02
php.ini from MAMP php5.5.12
[PHP]
;;;;;;;;;;;;;;;;;;;
; About php.ini ;
;;;;;;;;;;;;;;;;;;;
; This file controls many aspects of PHP's behavior. In order for PHP to
; read it, it must be named 'php.ini'. PHP looks for it in the current
; working directory, in the path designated by the environment variable
; PHPRC, and in the path that was defined in compile time (in that order).
; Under Windows, the compile-time path is the Windows directory. The
@susanBuck
susanBuck / books.json
Last active August 29, 2015 14:03
Sample data for Foobooks
{
"The Great Gatsby": {
"id" : 0,
"author": "F. Scott Fitzgerald",
"tags" : ["novel","fiction","classic","wealth"],
"published" : 1925,
"cover" : "http://img2.imagesbn.com/p/9780743273565_p0_v4_s114x166.JPG",
"purchase_link" : "http://www.barnesandnoble.com/w/the-great-gatsby-francis-scott-fitzgerald/1116668135?ean=9780743273565"
},
"The Bell Jar": {