Skip to content

Instantly share code, notes, and snippets.

View samccone's full-sized avatar
🐐

Sam Saccone samccone

🐐
  • Google
  • ∆∆∆<script>alert(prompt('why'))</script>
  • X @samccone
View GitHub Profile
data:text/html;charset=utf-8,<!DOCTYPE%20html><html%20lang%3D"en"><head><title>Advertisement%20Title<%2Ftitle><%2Fhead><body%20style%3D"margin%3A0px%3B%20padding%3A0px%3B%20margin-top%3A50px%3B%20"><iframe%20scrolling%3Dno%20seamless%3D"seamless"%20style%3D"overflow-y%3A%20hidden%3B%20border%3A0px%3B%20display%3Ablock%3B%20margin-left%3Aauto%3B%20margin-right%3Aauto%3B%20width%3A1200px%3B%20height%3A800px%3B"%20src%3D"http%3A%2F%2Fa.aproductmsg.com%2Fasw%2Fpir%2F305%2F2186033%2F1%2Fo.html%3Fcdm%3Dxads.zedo.com%26a%3D2186033%26x%3D3853%26g%3D172%26c1%3D305002125%26c2%3D305002125%26i%3D0%26n%3D305%26s%3D518%261%3D8%262%3D1%26tg%3D1423629425%26vr%3D1%26m%3D14%26w%3D43%26os%3D9%26p%3D8%26h%3D1425848%26f%3D3097535%26b%3D10%26o%3D20%26y%3D72%26v%3D1%26t%3Di%26u%3Dmmb%40D0bNSWCkCwOuJLRugw**~080814%26z%3D0.5684608246681243%26mb%3D13%26dm%3D.zedo.com%26pt%3DAdvertisement%26q%3D%26sk%3D%26l%3D%26cd%3D%26adm%3Dc13.zedo.com%26r%3D3%26ldm%3Dl1.zedo.com%26exp%3D0%26cm%3D%26tt%3D0%26wm%3DTransparent%26dnt%3D0%26tsad%3D0
@samccone
samccone / gist:86da2edeaabc2d2569ed
Created December 31, 2014 01:19
Marionette Meeting Notes 12.30.14
  • Sam Saccone

    • minor 2.3.1 release to fix html bug
    • new website is almost up to feature pairity
  • James kyle

    • new view ideas
      • investigation into a way to render children that are independent of their parent view render cycle, in an effort to optimize rendering and child view updates.
      • In step with this idea, questioning the idea of having a region and is it even needed?
{"title":"Finding the norm of a vector in Javascript","author":"jmeas","pages":[{"pageName":"","sections":[{"type":"text","source":"The norm, or magnitude, of a vector, is its length. In two dimensions, this can be represented in the following way:\n\n$$\\lVert v \\rVert = \\sqrt{x^2+y^2}$$\n\nIn Javascript, we could write a function to calculate this like so:\n\n```js\nfunction norm(x, y) {\n return Math.sqrt(x*x + y*y);\n}\n```\n\nLet's see an example of that:"},{"type":"javascript","source":"// Define the norm\nfunction norm(x, y) {\n return Math.sqrt(x*x + y*y);\n}\n\n// Calculate it\nvar val = norm(3, 4);\n\n// Set it to the output div\nvar output = document.getElementsByClassName('output')[0];\noutput.innerHTML = val;"},{"type":"html","source":"<!-- This is just a div to show our output -->\n\n<div class='output'></div>"},{"type":"css","source":"/* Let's give it some styling, too */\n\n.output {\n background: #eee;\n border: 1px solid #ddd;\n padding: 20px;\n}"}]}],"public":true}
<html>
<style>
* {
margin: 0;
padding: 0;
}
</style>
<body>
<script>
orb.prototype.fill = function() {
return new Promise(function(resolve, reject) {
(function(tick, resolve) {
this.c.setAttribute("stroke-width", tick);
this.c.setAttribute("r", this.size - tick/2);
var r = arguments.callee;
window.requestAnimationFrame(function(t, resolve) {
if (this.size > t) {
r.call(this, t+1, resolve);

todo for marionette support

  • Copy for page
  • Design for page
  • Implement page
  • Press release marketing push?
@samccone
samccone / gist:0bdb7b2d226715f29587
Created September 24, 2014 19:05
Current roots v3 errors

Current errors

Potentially unhandled rejection [16] AssertionError: value: expected 'C:\\cygwin64\\home\\IEguy\\repos\\roots\\test\\fixtures\\compile\\path_helper\\public\\path_helper.html' to exist
  at [object Function].<anonymous> (C:\cygwin64\home\IEguy\repos\roots\node_modules\chai-fs\lib\assertions\file.js:21:53)
  at [object Function].ctx.(anonymous function) [as file] (C:\cygwin64\home\IEguy\repos\roots\node_modules\chai\lib\chai\utils\addMethod.js:40:25)
  at Compile.<anonymous> (C:\cygwin64\home\IEguy\repos\roots\test\compile.coffee:143:21)
@samccone
samccone / gist:6dd71bd310ab8e6158ba
Created September 23, 2014 13:42
Frontend Designer toolkit

Frontend Designer Toolkit

Markup

  • jade

Styles

  • stylus
p
| this is some text content
a.ui-blah(href='#') this is a link
@samccone
samccone / newtest.js
Last active August 29, 2015 14:05 — forked from joshtombs/newtest.js
module.exports = function(){
this.Given(/^I visit TODOMVC$/,function(){
return this.driver.get('http://todomvc.com/architecture-examples/backbone/')
});
this.When(/^I enter "([^"]*)"$/, function(value){
return new this.Widget({
root: "#new-todo"
}).sendKeys(value,Driver.Key.ENTER);
});