This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Draggable = function(element) { | |
| element.addEventListener('mousedown', Draggable.mousedown, false); | |
| document.addEventListener('mouseup', Draggable.mouseup, false); | |
| } | |
| Draggable.mousedown = function(e) { | |
| e.target.style.position = 'relative'; | |
| document.addEventListener('mousemove', Draggable.mousemove, false); | |
| var startingPosition = Draggable.mouseposition(e); | |
| var targetPostion = Draggable.targetposition(e); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Cheesewire = { | |
| cutsTheMustard: function(){ | |
| if('querySelector' in document | |
| && 'localStorage' in window | |
| && 'addEventListener' in window) { | |
| return true; | |
| } | |
| return false; | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'ruby-debug' | |
| # An HTTPS client that can read the Forge PEMs | |
| module Forge | |
| module Http | |
| require 'net/http' | |
| require 'net/https' | |
| require 'uri' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| var Droop = function(){ | |
| } | |
| Droop.simulateDragStart = function(target){ | |
| var e = new Event('mousedown'); | |
| target.dispatchEvent(e); | |
| } | |
| Droop.simulateDrag = function(position){ | |
| var e = new Event('mousemove'); | |
| e.pageY = position.y; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| module JSLoader | |
| def read_file(file) | |
| file = File.open(file, "rb") | |
| contents = file.read | |
| file.close | |
| contents | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'rubygems' | |
| require 'configatron' | |
| require 'colorize' | |
| configatron.app_root= File.dirname(__FILE__) | |
| configatron.app_name = "events" | |
| configatron.relish_id = "bbc-knowlearn/kandl-events-poc" | |
| def run_phpunit | |
| system "phing -Dwebapp.name=#{configatron.app_name} -Dwebapp.root=#{configatron.app_root}/webapp test coverage -f #{configatron.app_root}/webapp/php/lib-test/all_tests.xml" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/usr/local/bin/python | |
| class HelloWorld: | |
| def say_hello(self,name): | |
| print "Hello, ", name | |
| helloWorld = HelloWorld() | |
| name = "Kenny" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| > cat ~/proxies_off | |
| #!/bin/sh | |
| echo "Proxies OFF" | |
| unset HTTP_PROXY | |
| unset ALL_PROXY | |
| unset http_proxy | |
| unset HTTPS_PROXY | |
| unset https_proxy |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @media all and (max-width: 320px){ | |
| article.intro { | |
| width: 100%; | |
| } | |
| section { | |
| width: 100%; | |
| } | |
| } | |
| @media all and (max-width: 640px) and (min-width: 321px){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require 'watchr' | |
| desc 'Start watching PHP changes and run PHPUnit' | |
| task :watch_php do | |
| script = Watchr::Script.new | |
| script.watch('./(.*)\.php') {|m| | |
| Rake::Task["phpunit"].reenable | |
| Rake::Task["phpunit"].invoke | |
| } | |
| handler = Watchr.handler.new; |
OlderNewer