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
| <!-- change all fonts --> | |
| <style>*{font-family: "My scrubby font";}</style>Your text here | |
| <!-- change just the header font --> | |
| <span style="font-family: 'My scrubby font'">Your text here</span> |
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
| (function(){ | |
| var header = "Lorem Ipsum"; | |
| var paragraph = "Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec a diam lectus. Sed sit amet ipsum mauris. Maecenas congue ligula ac quam viverra nec consectetur ante hendrerit. Donec et mollis dolor. Praesent et diam eget libero egestas mattis sit amet vitae augue."; | |
| var headerElems = document.querySelectorAll("h1, h2, h3, h4, h5, h6"); | |
| var pElems = document.querySelectorAll("p"); | |
| for (var i = 0; i < headerElems.length; i++) { | |
| headerElems[i].textContent = header; | |
| } |
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
| Hello, human (or bot). | |
| This the Baconhawk tab thingamajiggy. | |
| Please enjoy, no pressure. | |
| (don't worry about major/minor, just wing it) |
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><!-- tell the browser that the page is written in HTML5, the latest version of the HTML standard --> | |
| <html><!-- element that contains all the HTML of the page --> | |
| <head><!-- information for the browser about how to read the page --> | |
| <title>Student Council</title><!-- title displayed in tab bar, bookmarks, history etc --> | |
| <meta charset="utf-8"><!-- tell the browser that the file is encoded in UTF-8, a character encoding able to encode all characters in Unicode --> | |
| </head> | |
| <body><!-- the actual content of the page --> | |
| </body> | |
| </html> |
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
| <!-- ... --> | |
| <header> | |
| <img src="//placehold.it/190x190"><!-- img tag represents an image. src attribute tells the browser where the image is located, currently placehold.it, because the new logo hasn't been made yet --> | |
| <h1>Student Council</h1><!-- the h1, h2, h3, h4, h5 and h6 elements represent headers, h1 being the biggest and h6 the smallest --> | |
| <nav><!-- functionally nearly identical to a div, but used for semantic reasons --> | |
| <a href="#introduction">Introduction</a><!-- a, short for anchor, represents a link that, when clicked, takes the user to a different page. in this case, the only change made is to the url hash, which will be handled by javascript and show a different section to the user --> | |
| <a href="#members">Members</a><!-- the code I used to achieve the single-page multiple-page effect will be explained in a blog post after this one --> | |
| <a href="news">News</a> | |
| <a href="#contact">Contact us</a> | |
| </nav> |
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/bin/python3 | |
| import sys | |
| import operator | |
| numbers = sys.argv[1].split(",") | |
| if len(sys.argv) > 2: | |
| type = sys.argv[2] | |
| else: |
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/bin/python3 | |
| import sys | |
| import math | |
| import time | |
| phi = (1+math.sqrt(5))/2 | |
| print("Phi = " + str(phi)) |
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
| import socket | |
| import math | |
| def nround(n): | |
| if n % 0.5 == 0: | |
| return math.ceil(n) | |
| else: | |
| return round(n) | |
| def hex2bin(hex_str): |
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
| <body> | |
| <section data-id="introduction"> | |
| </section> | |
| <section data-id="members"> | |
| </section> | |
| <section data-id="news"> |
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
| <section id="introduction"> | |
| <h2>Introduction</h2> | |
| <p>We, the Sha Tin College Student Council, are a group consisting of 16 students who are all dedicated to the objective of fostering a unified, harmonious, and equal community.</p> | |
| <p>We are responsible for expressing student voice in the Sha Tin campus by working cohesively with all parties to achieve and implement the goals desired by the student community.</p> | |
| <p>As representatives of the student population, we take any and all opinions in the highest regard with the aim of creating a holistic environment for all.</p> | |
| <img src="img/group-photo.jpg"> | |
| </section> |