Skip to content

Instantly share code, notes, and snippets.

😄
loged on

Dan Nolan dannolan

😄
loged on
Block or report user

Report or block dannolan

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
View gordypls.py
import json
from pprint import pprint
json_data=open('formatted.json')
data = json.load(json_data)
# pprint(data['features'])
for x in data['features']:
print(x["properties"]["headline"])
View blockdeclsyntax.md

List of Block Declaration Syntaxes

Throughout, let

  • return_type be the type of object/primitive/etc. you'd like to return (commonly void)
  • blockName be the variable name of the block you're creating
  • var_type be the type object/primitive/etc. you'd like to pass as an argument (leave blank for no parameters)
  • varName be the variable name of the given parameter And remember that you can create as many parameters as you'd like.

Blocks as Variables

Possibly the most common for of declaration.

View notronbing.js
$("#submitButton").on("click",function(event){
var text = $("#textField").val();
$(".nameClass").each(function(index,val){
$(val).text(text);
});
});​
@dannolan
dannolan / bootstrap_pagination_helper.rb
Created Jul 13, 2012 — forked from oparrish/bootstrap_pagination_helper.rb
Link renderer to be used with will_paginate to render links to work with Twitter Bootstrap
View bootstrap_pagination_helper.rb
module BootstrapPaginationHelper
class LinkRenderer < WillPaginate::ActionView::LinkRenderer
protected
def page_number(page)
unless page == current_page
link(page, page, :rel => rel_value(page))
else
link(page, "#", :class => 'active')
end
You can’t perform that action at this time.