Skip to content

Instantly share code, notes, and snippets.

View atleastimtrying's full-sized avatar

Anders Fisher atleastimtrying

View GitHub Profile
@atleastimtrying
atleastimtrying / gist:89251b5cb0d703012ce0
Created August 14, 2014 13:23
sample truefalse questions
{"category_names":["Sport","History","Geography"],"categories":[[[{"question":"finland is a sport","answer":false,"hints":[],"options":[true,false],"src":null,"category":"Sport","level":"1"},{"question":"football is a sport","answer":false,"hints":[],"options":[true,false],"src":null,"category":"Sport","level":"1"}],[{"question":"rugby is a sport","answer":true,"hints":[],"options":[true,false],"src":null,"category":"Sport","level":"2"}],[{"question":"Golf is a sport","answer":true,"hints":[],"options":[true,false],"src":null,"category":"Sport","level":"3"}]]]}
4 questions all sport, 2 level1 1 level 2 and 1 level 3
"{1FB4E294-102B-475C-876A-000005E78B1E}","177000","2012-05-29 00:00","BS4 5AW","S","N","F","11","","WATER LANE","BRISLINGTON","BRISTOL","CITY OF BRISTOL","CITY OF BRISTOL","A"
"{7C2657EA-ED48-45D3-BD11-00001BB6355D}","77000","2012-07-19 00:00","L36 6BZ","S","N","F","46","","LANSBURY ROAD","","LIVERPOOL","KNOWSLEY","MERSEYSIDE","A"
"{4682268C-658F-4387-B8A1-0000425E5B57}","325000","2012-01-16 00:00","SP3 6EE","T","N","F","CAROLINE COTTAGE","","THE DENE","HINDON","SALISBURY","WILTSHIRE","WILTSHIRE","A"
"{73B95FBC-A2BF-4E7C-8B32-00004ED72404}","230000","2012-11-28 00:00","W5 4RQ","F","N","L","149","","CLAYPONDS GARDENS","","LONDON","HOUNSLOW","GREATER LONDON","A"
"{27E4A53F-58B4-45AB-B8B5-000056FA089F}","490000","2012-08-10 00:00","SK7 3DL","D","N","F","302","","BRAMHALL LANE SOUTH","BRAMHALL","STOCKPORT","STOCKPORT","GREATER MANCHESTER","A"
"{B29217D6-E577-4308-AA5C-0000811FA540}","170000","2012-08-29 00:00","IP14 2NR","D","N","F","14","","MILLERS CLOSE","","STOWMARKET","MID SUFFOLK","SUFFOLK","A"
"{ED64EF0C-E6
PREFILL_CONTENT =
general_news:
title: 'General News'
body: '<p><strong><a href=""></a></strong> have </p>
<p></p>
<p></p>
<p><strong>See Also: <a href="URL">TITLE</a></strong><br/>
<strong>See Also: <a href="URL">TITLE</a></strong></p>'
seo_title: 'Page Title: | News | The 405'
seo_keywords: 'music news, the 405, news'
class window.FAdminForm
PREFILL_CONTENT =
general_news:
title: 'General News'
body: '<p><strong><a href=""></a></strong> have </p>
<p></p>
<p></p>
<p><strong>See Also: <a href="URL">TITLE</a></strong><br/>
<strong>See Also: <a href="URL">TITLE</a></strong></p>'
seo_title: 'Page Title: | News | The 405'
//measure the quality of life of workforce and supply chain
//measure level of employment/unemployment in area of development.
//measure creation of new work/supporting societites
//values available about companies
//the mission of the company
//description of the outputs of the company gives evidence of direction towards the mission
//outcomes +ve
// how the intended changes have been enacted and the results of these.
// impact -ve (usually)
// additional information on how the mission has changed the world.
@atleastimtrying
atleastimtrying / diatribe.txt
Last active August 29, 2015 13:56
The mistakes of 'code', 'hacker' and 'hacking'.
The mistakes of the words 'code', 'hacker' and 'hacking'
========================================================
As someone who habitually and professionally spends time writing computer programs and web sites using
a variety of programming languages, there are a few phrases that irk me as I feel that they poorly
represent the joyful, creative experience that is creating systems within a computer. The majority of
my issues are based around the associated semantics of the words used.
---
'code' - A code is something written to conceal or hide away. it is something that is secret to be
broken or discovered. Writing computer programs is primarily a means of expressions of ideas,
instructions or intents. These instructions are increasingly written to be more and more legible to
<?php
require 'includes/mapData.php';
?>
var map;
var living1 = new google.maps.LatLng(37.3333, -121.9000);
var MY_MAPTYPE_ID = 'custom_style';
@atleastimtrying
atleastimtrying / gist:7660554
Created November 26, 2013 15:36
multi touch drag the dots
pos = [0,0]
origin = [0,0]
init = ->
$('.dot').on 'touchstart': startDrag
startDrag = (event)=>
dot = $ event.currentTarget
dot.on
'touchmove': moveDrag
'touchend': endDrag
offset = dot.offset()
@atleastimtrying
atleastimtrying / gist:5468463
Last active December 16, 2015 17:09
Drying this up
def regions_with_country_ids_for_select(collection)
response = []
collection.each do |item|
response << [item.name, item.id, :"data-parent_id" => region.country_id]
end
response
end
def referral_origins_for_select(collection)
response = []
@atleastimtrying
atleastimtrying / gist:5451944
Last active December 16, 2015 14:49
horrid index function
def index
@titles = Title.all
@genders = Gender.all
if not params[:find_by_student_id].blank?
@found_student = Student.find(params[:find_by_student_id])
else
if(params.size > 4)
if params[:title_id].present?
@results = @results || Student
@results = @results.where('title_id = ? ', params[:title_id])