Skip to content

Instantly share code, notes, and snippets.

View dannolan's full-sized avatar
😄
loged on

Dan Nolan dannolan

😄
loged on
View GitHub Profile
@dannolan
dannolan / TwitterIndiaOutput.json
Created November 25, 2019 22:16
Twitter India - Updated Output
{
"id": "46007404-a7e4-4637-b093-4dca9c8a9c8c",
"hashtag": "#SingleLife",
"total": 4,
"sentiment": {
"positive": 25,
"negative": 75
},
"users": [
{
@dannolan
dannolan / confluencebreaker.md
Created July 18, 2018 05:02
Markdown that breaks Confluence

Analytics Runthrough

Campaign Types

  • item one
  • item two
  • item three

This is how we take items and return them to our thing this is more content to show that we have content and it is not workign in a way that we nwant it to work.

@dannolan
dannolan / main.go
Created March 2, 2018 04:50
Go Range Request
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Range", "bytes=0-5088")
var client http.Client
resp, _ := client.Do(req)
@dannolan
dannolan / sds.txt
Created September 8, 2016 23:50
Shit dan says
Are you in some kind of warzone? Oh, that's terrible
NDA the size of a human skull
what's punting

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.

@dannolan
dannolan / notronbing.js
Created August 31, 2012 02:48
For notron
$("#submitButton").on("click",function(event){
var text = $("#textField").val();
$(".nameClass").each(function(index,val){
$(val).text(text);
});
});​
@dannolan
dannolan / bootstrap_pagination_helper.rb
Created July 13, 2012 04:52 — forked from oparrish/bootstrap_pagination_helper.rb
Link renderer to be used with will_paginate to render links to work with Twitter Bootstrap
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
@dannolan
dannolan / spendyspendy.txt
Last active August 29, 2015 14:26
Top Entitlement Claiming Federal Politicians in Australia (2H 2014)
Top Spenders OVERALL
The Hon Tony Abbott MP - $1057673
The Hon Julie Bishop MP - $866653
Mr Tony Pasin MP - $851482
Mr Tim Watts MP - $556863
The Hon Andrew Robb AO MP - $539247
The Hon Darren Chester MP - $529344
Mr Wyatt Roy MP - $526258
Senator the Hon Simon Birmingham - $523191
@dannolan
dannolan / gist:7afe945481cb099b083d
Created May 4, 2015 07:19
Apple's Frequent Locations logging fails
May 4 17:10:14 iPod-touch routined[5308] <Notice>: 452416214.294107 (4/05/2015 17:10:14 AEST), [DATABASE]: failed to execute statement
May 4 17:10:14 iPod-touch routined[5308] <Notice>: 452416214.295157 (4/05/2015 17:10:14 AEST), [DATABASE]: statement, INSERT INTO Hint (Timestamp, Latitude, Longitude, HorizontalAccuracy) VALUES (?, ?, ?, ?), return code, 19, error, UNIQUE constraint failed: Hint.Timestamp, Hint.Latitude, Hint.Longitude
May 4 17:10:14 iPod-touch routined[5308] <Notice>: 452416214.307433 (4/05/2015 17:10:14 AEST), [DATABASE]: failed to finalize statement
May 4 17:10:14 iPod-touch routined[5308] <Notice>: 452416214.308205 (4/05/2015 17:10:14 AEST), [DATABASE]: statement, , return code, 19, error, UNIQUE constraint failed: Hint.Timestamp, Hint.Latitude, Hint.Longitude
@dannolan
dannolan / borked.swift
Created December 8, 2014 07:14
Swifty Swifty Buggy Swifto
enum DisplayOrientation : CGFloat{
case WideScreen = 0
case Portrait = 1.5707963268
case UpsideDown = 3.1415926536
case PortraitUpsideDown = 4.7123889804
}