Skip to content

Instantly share code, notes, and snippets.

(function() {
var columns = 24,
css = '.bbcnews-debug-grid{position:fixed;left:0;top:0;right:0;bottom:0;z-index:9999;display:block;pointer-events:none}.bbcnews-debug-grid__inner{height:100%;margin:0 auto;padding:0 4px}.bbcnews-debug-column{float:left;width:4.166666667%;height:100%}.bbcnews-debug-column__inner{margin-left:4px;margin-right:4px;height:100%;background-color:rgba(0,171,236,0.2)}@media(min-width:400px){.bbcnews-debug-grid__inner{padding:0 12px}}@media(min-width:600px){.bbcnews-debug-grid__inner{padding:0 24px}.bbcnews-debug-column__inner{margin-left:8px;margin-right:8px}}@media(min-width:1008px){.bbcnews-debug-grid__inner{width:992px;max-width:992px;padding:0}}';
function createColumn(i) {
var column = document.createElement('div'),
inner = document.createElement('div');
column.className = 'bbcnews-debug-column bbcnews-debug-column--'+i;
desc "Watch stylesheets to automatically compile"
task :news do
sh "compass watch --config tabloid/webapp/conf/compass.rb tabloid/webapp/static/sass/core.scss tabloid/webapp/static/sass/compact.scss tabloid/webapp/static/sass/tablet.scss tabloid/webapp/static/sass/wide.scss"
end
@danscotton
danscotton / gist:5128037
Created March 10, 2013 10:26
dom builder sketch..
var structure = frag(
div('#js-a',
p.text('abc'),
p.text('def')
),
div('#js-b', ['x', 'y', 'z'],
p('#js-c', ['some_other_class']).text('ghi')
)
);
{
"bold_folder_labels": true,
"color_scheme": "Packages/RailsCasts Colour Scheme/RailsCastsColorScheme.tmTheme",
"draw_white_space": "all",
"folder_exclude_patterns":
[
"data",
".git",
".svn",
".hg",
@danscotton
danscotton / gist:5081251
Last active December 14, 2015 11:48
andy css
header .logo {
line-height: 1.25em; /* 20px */
}
header .logo span {
margin-bottom: 0px;
}
header .logo span a {
text-decoration: none;
color: #28292A;
}
@danscotton
danscotton / gist:5081246
Last active December 14, 2015 11:48
andy tumblr header
Replace:
<header>
<div class="container">
<a href="/" class="logo">
<img ... />
<span>{Title}</span>
<span class="subtitle">Design. IA. Flash.</span>
</a>
</div>
@danscotton
danscotton / sass_spec.rb
Created March 3, 2013 14:15
custom sass directives rspec
require "sass"
# this just simplifies css comparison
class String
def format_css
self.strip.split(/\n/).select { |line| line.strip!; !line.empty? }.join('\n')
end
end
describe "Sass to CSS" do
$ cat .git/config
[core]
repositoryformatversion = 0
filemode = true
bare = false
logallrefupdates = true
ignorecase = true
[remote "heroku"]
url = [email protected]:bbc-news-prototypes.git
@danscotton
danscotton / analyticsclient_feedback.md
Created February 5, 2013 11:03
AnalyticsClient Feedback
  1. Can't remember the fancy name of these coding styles, but instead of:

    return function()
    {
        
    if(expression)
    {
    
----------------------------------------------------------------------------
REQUEST FORMAT 1:
http://stats.bbc.co.uk/o.gif?
s: News
t: 0_Load
i: 19948140
p: 99110
a: 0
u: http://pal.sandbox.dev.bbc.co.uk/news/test-map-0
r: 0