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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Change Text Example</title> | |
</head> | |
<body> | |
<h1>Change Text with JavaScript</h1> | |
<p id="myParagraph">This is the original text.</p> | |
<button onclick="changeText()">Change Text</button> | |
<button onclick="fooblap()">Button without a Function!</button> |
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
// In a GitHub PR, you can run this script in a console to help automatically click the Viewed checkbox | |
// Worked as of 2023.12.18 | |
// JS snippet to click 'Viewed' on files that were deleted entirely, not changed or renamed | |
Array.from(document.querySelectorAll('.js-diff-load')).forEach(fileInfo => { | |
const text = fileInfo.nextElementSibling.textContent.trim(); | |
if(text.includes('This file was deleted.')) { | |
const viewedCheckbox = fileInfo.closest('.js-file.js-details-container').querySelector('.js-reviewed-checkbox'); | |
if(viewedCheckbox && !viewedCheckbox.checked) { | |
viewedCheckbox.click(); | |
} |
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
global.helloWorldText = 'Hello, world!'; | |
helloWorld = function() { | |
console.log(global.helloWorldText); | |
return global.helloWorldText; | |
}; | |
helloWorld(); |
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
# spec/support/matchers/alias_method_matcher.rb | |
# RSpec matcher for alias_method. | |
# Orignal idea borrowed from: https://gist.github.com/1950961 | |
# Usage: | |
# | |
# describe Boomerang do | |
# let(:boomerang) { described_class.new } | |
# let(:subject} { boomerang } | |
# it { is_expected.to alias_method(:in_flight?).to(:in_air?) } |
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
{ | |
"project": { | |
"name": "Denver", | |
"description": "Data collected that is in the Denver, CO area.", | |
"id": "3bc943c3-6477-4010-a876-8e5fce61fdf1", | |
"created_at": "2014-05-07T19:17:42Z", | |
"updated_at": "2014-05-07T19:17:42Z" | |
} | |
} |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>HamlPlayground</title> | |
<link rel="stylesheet" media="all" href="/assets/scaffolds-07f6f551a374e3569370d2d26dba981d.css?body=1" data-turbolinks-track="true" /> | |
<link rel="stylesheet" media="all" href="/assets/testers-069e88c06b889877799890854d7f4c40.css?body=1" data-turbolinks-track="true" /> | |
<link rel="stylesheet" media="all" href="/assets/application-a6772d2c79915825e0baf618a303d51b.css?body=1" data-turbolinks-track="true" /> | |
<script src="/assets/jquery-eb3e278249152b5b5d5170b73d9dbf52.js?body=1" data-turbolinks-track="true"></script> | |
<script src="/assets/jquery_ujs-0b8f09cf5aec4ba1be1abd9f915c77e2.js?body=1" data-turbolinks-track="true"></script> | |
<script src="/assets/turbolinks-924184401b7d116eadaaefc96895fa84.js?body=1" data-turbolinks-track="true"></script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<link rel="stylesheet" type="text/css" href="node_modules/leaflet-draw/dist/leaflet.draw.css" /> | |
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" type="text/css" href="node_modules/leaflet-toolbar/dist/Leaflet.Toolbar.css" /> | |
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> | |
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<link rel="stylesheet" type="text/css" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<link rel="stylesheet" type="text/css" href="leaflet.draw.css" /> | |
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css"> | |
<link rel="stylesheet" type="text/css" href="leaflet.toolbar.css" /> | |
<link rel="stylesheet" type="text/css" href="//maxcdn.bootstrapcdn.com/font-awesome/4.2.0/css/font-awesome.min.css"> | |
<script src="//code.jquery.com/jquery-1.11.2.min.js"></script> |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<title>Minimal Leaflet Page</title> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" /> | |
<style> | |
html, body, #map { margin: 0; height: 100%; width: 100%; } | |
</style> | |
<script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script> |
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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="utf-8"> | |
<!-- For viewing the page on mobile devices --> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<title>Barebones HTML5</title> | |
<link rel="stylesheet" href="style.css"> | |
<script src="application.js"></script> | |
</head> |
NewerOlder