Skip to content

Instantly share code, notes, and snippets.

View lukeholder's full-sized avatar
👾

Luke Holder lukeholder

👾
View GitHub Profile
<?php
require "simplenoteapi.php";
$notesocket = new simplenoteapi;
$notesocket->login('me@gmail.tld', 'pass');
$eachnote = $notesocket->index();
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>HTML 5</title>
<!--[if IE]>
<script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<style>
<?php
class Dashboard extends Admin_Controller {
function Dashboard()
{
parent::Admin_Controller();
}
function index()
@lukeholder
lukeholder / Controller.php
Created October 19, 2010 12:51
extending the controller.
<?php
class Blog extends Controller{
function index(){
echo 'Hello World!';
}
@lukeholder
lukeholder / html5_simple_boilerplate.html
Created April 7, 2011 06:50
ultra simple html5 boilerplate
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Document</title>
<link rel="stylesheet" href="style.css">
<script src="http://ajax.aspnetcdn.com/ajax/jquery/jquery-1.5.min.js" type="text/javascript"></script>
</head>
<body>
<h1>Document</h1>
@lukeholder
lukeholder / html5simple.html
Created April 8, 2011 20:24
a simple html5 template
<!DOCTYPE HTML>
<html lang="en">
<head>
<!--Page Title-->
<title>HTML5 Starter</title>
<!--Meta Tags-->
<meta charset="utf-8">
<meta name="keywords" content="">
<meta name="description" content="">
<!-- Set Viewport-->
@lukeholder
lukeholder / handlebars helper
Created November 8, 2011 01:02
handlebars get index array by helper
Handlebars.registerHelper('get', function(context, block) {
return block(context[block.hash['index']]);
});
// Use it
{{#get people index="1"}}
{{name}}
{{/get}}
@lukeholder
lukeholder / request
Created November 16, 2011 23:52
rails segment request
routes:
match '*segments' => 'RumaRequest#out'
request url:
http://rumaengine.dev/ds/dsa/dsa?fds=fds
@lukeholder
lukeholder / reset-div.css
Created January 21, 2012 03:07
Reset everything for one div
/* selector for element and children */
#parent-element,#parent-element *,#parent-element a:hover,#parent-element a:visited,#parent-element a:active{
background:none;
border:none;
bottom:auto;
clear:none;
cursor:default;
/* didn't really know what the default for display should be*/
/*display:inline;*/
float:none;
#Newbie programmer
def factorial(x):
if x == 0:
return 1
else:
return x * factorial(x - 1)
print factorial(6)
#First year programmer, studied Pascal