Skip to content

Instantly share code, notes, and snippets.

View justinpeterman's full-sized avatar

Justin Peterman justinpeterman

  • San Francisco, CA
View GitHub Profile
@justinpeterman
justinpeterman / core.js
Created July 20, 2011 07:58
Nested Records
Authoring = SC.Application.create(
store: SC.Store.create().from(SC.Record.fixtures)
}) ;
@justinpeterman
justinpeterman / view.js
Created July 27, 2011 10:10
Actions Not Being Received
//sc_require('views/topbar_view');
Authoring.NewExistingView = SC.PalettePane.create({
firstResponder: 'Authoring.statechart',
layout: { width: 455, height: 275, centerX: 0, centerY: 0 },
isModal:YES,
theme: "popover",
modalPane:SC.ModalPane.extend({classNames:"dark-bg"}),
classNames:'new-existing'.w(),
childViews:'toolbar'.w(),
@justinpeterman
justinpeterman / style.css
Created July 30, 2011 10:16
cool horizontal line break
body{
background: #2F2F2F;
}
.horizontal-break {
-moz-box-shadow: rgba(255, 255, 255, 0.07) 0 1px 0 inset;
-webkit-box-shadow: rgba(255, 255, 255, 0.07) 0 1px 0 inset;
-o-box-shadow: rgba(255, 255, 255, 0.07) 0 1px 0 inset;
box-shadow: rgba(255, 255, 255, 0.07) 0 1px 0 inset;
border-top: 1px solid #121212;
Authoring.Campaign.FIXTURES = [
{
user_id: 2,
campaign_id: 1,
name: "Pepsi Faceoff Campaign",
thumb: 'path/to/image',
purchased_hits: 0,
current_hits: 0,
started: '2010-07-24',
@justinpeterman
justinpeterman / file.js
Created August 18, 2011 21:03
ExistingCampaignSelectionView
Authoring.ExistingCampaignSelectionView = SC.PalettePane.create({
layout: {
width: 465,
height: 535,
centerX: 0,
centerY: 0
},
isModal: YES,
theme: "popover",
modalPane: SC.ModalPane.extend({
@justinpeterman
justinpeterman / ad_dialogs.tpl.php
Created September 8, 2011 05:57
global scope variable
<?php
if(!empty($GLOBALS['social_dialog'])): //Step 4: Ok, was anything generated during that pages/element loop?
echo $GLOBALS['social_dialog']; //print out the html string generated if so...
endif;
?>
<?php
$data="12.30 Conservative Policy Forum
Manchester Central : Exchange Auditorium
CPF Lecture
Open to Party members only
12.30 Demos in partnership with Pears Foundation
Midland Hotel : The French
Best Of British: Reflections on patriotism's place in policy
@justinpeterman
justinpeterman / app.js
Created October 12, 2011 06:09
Dynamic image in Jo
//init new element
new joHeaderImg("http://scdev.gizmo.com/images/pepsi_faceoff_bold.png","50","50")
@justinpeterman
justinpeterman / style.css
Created October 15, 2011 01:59
animated button
pre {
background: #efefef;
-webkit-box-shadow: 1px 1px 0 #cfcfcf,
2px 2px 0 #cfcfcf,
3px 3px 0 #cfcfcf,
4px 4px 0 #cfcfcf,
5px 5px 0 #cfcfcf;
-webkit-transition: all 0.1s linear;
padding: 20px;
}
new joContainer([
tabContent = new joContainer([
new joTitle("Hello from tab1").setStyle({
display: 'none'
}), new joTitle("Hello from tab2").setStyle({
display: 'none'
})]),
new joFlexrow(