Skip to content

Instantly share code, notes, and snippets.

<select name="Country">
<option value="" selected="selected">Select Country</option>
<option value="United States">United States</option>
<option value="United Kingdom">United Kingdom</option>
<option value="Afghanistan">Afghanistan</option>
<option value="Albania">Albania</option>
<option value="Algeria">Algeria</option>
<option value="American Samoa">American Samoa</option>
<option value="Andorra">Andorra</option>
<option value="Angola">Angola</option>
@pipster
pipster / mysqli oop
Created December 4, 2012 18:41
how to use prepared statements and oop php with mysqli
new-film.php
<?php
if(isset($_POST['submit'])) {
$mysqli = new mysqli('localhost', 'root', 'root', 'sakila');
$statement = $mysqli->prepare("INSERT INTO film(first_name, last_name) VALUES(?, ?)");
$statement->bind_param('ss', $_POST['first_name'], $_POST['last_name']);
$statement->execute();
@pipster
pipster / gist:3961367
Created October 26, 2012 20:41
twitter bootstrap starter
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>The Basic Bootstrap Setup HTML</title>
<link rel="stylesheet" href="css/bootstrap.css">
<link rel="stylesheet" href="css/bootstrap-responsive.css">
<!-- HTML5 shim for IE backwards compatibility -->
<!--[if lt IE 9]>
@pipster
pipster / gist:3847142
Created October 7, 2012 04:52
st2 settings template
{
"folders":
[
{ // theme
"path": "/C/wamp/www/wordpress/wp-content/themes/twentyeleven",
"name": "Twenty Eleven Theme",
"file_exclude_patterns":[
"._*",
"*.ico",
"*.swf"
@pipster
pipster / gist:3797547
Created September 28, 2012 01:53
CSS: Image Replacement
.ir {
border: 0;
font: 0/0 a;
text-shadow: none;
color: transparent;
background-color: transparent;
}
@pipster
pipster / gist:3797492
Created September 28, 2012 01:35
HTML: TEST
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="assets/css/style.css">
</head>
<body>
this is a test
</body>
@pipster
pipster / gist:2726243
Created May 18, 2012 16:30 — forked from lucasfais/gist:1207002
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@pipster
pipster / gist:2374761
Created April 13, 2012 07:19
Sublime Text 2 - Useful Shortcuts (PC)

Sublime Text 2 – Useful Shortcuts (PC)

Loosely ordered with the commands I use most towards the top. Sublime also offer full documentation.

Editing

Ctrl+X delete line
Ctrl+↩ insert line after
Ctrl+⇧+↩ insert line before
Ctrl+⇧+↑ move line (or selection) up
@pipster
pipster / gist:2035003
Created March 14, 2012 08:11
CSS: Joseph Lowery Simple reset
* {
vertical-align: baseline;
font-weight: inherit;
font-family: inherit;
font-style: inherit;
font-size: 100%;
outline: 0;
padding: 0;
margin: 0;
}
@pipster
pipster / IE conditionals
Created March 14, 2012 04:13 — forked from philsherry/IE conditionals
Conditional comments for including IE-related stuff
<!--[if lte IE 8]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<link rel="stylesheet" href="/css/ie.css" media="screen" />
<![endif]-->
<!--[if lte IE 7]>
<link rel="stylesheet" href="/css/ie7.css" media="screen" />
<![endif]-->
<!--[if lte IE 6]>
<link rel="stylesheet" href="/css/ie6.css" media="screen" />
<![endif]-->