This file contains 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
{"appIconSize":130,"apps":[{"icon":"/img/fb.png","url":"http://www.facebook.com"},{"icon":"/img/el.png","url":"https://ello.co/"},{"icon":"http://a1.mzstatic.com/us/r30/Purple3/v4/bc/88/c4/bc88c44d-9de7-28b4-e2ab-a51c072a1600/icon175x175.jpeg","url":"https://sc-racers.slack.com"},{"icon":"/img/ix.png","url":"https://inbox.google.com/"},{"icon":"/img/gd.png","url":"https://drive.google.com"},{"icon":"/img/yt.png","url":"http://www.youtube.com"},{"icon":"/img/yh.png","url":"http://www.yahoo.com"},{"icon":"/img/pk.png","url":"http://getpocket.com/a/queue/"},{"icon":"/img/tw.png","url":"https://twitter.com"},{"icon":"/img/gd.png","url":"https://drive.google.com"},{"icon":"/img/gk.png","url":"https://drive.google.com/keep"},{"icon":"/img/vg.png","url":"http://www.theverge.com"}],"autoClose":true,"bgBlur":false,"firstRun":false,"noAnimation":false,"recSiteCount":3,"showAllBookmarks":false,"showAppsDrawer":true,"showBookmarks":false,"showFB":true,"showFBNotif":true,"slotCount":6,"titleText":"","topSiteCount":0,"useF |
This file contains 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 xml.etree.ElementTree as ET | |
def xml_modify(fname, attr, val): | |
tree = ET.parse(fname) | |
root = tree.getroot() | |
for child in root: | |
child.attrib[attr] = val | |
return(ET.tostring(root).decode("utf-8")) | |
''' |
This file contains 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
Array.prototype.append = function(arr){ | |
return [].push.apply(this, arr); | |
}; |
This file contains 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 zpad = function(str, len){ | |
if (typeof str !== "string") str = str.toString(); | |
return (new Array(len + 1).join("0") + str).slice(- len); | |
}; | |
/* | |
zpad("1", 4) | |
--> 0001 | |
*/ |
This file contains 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
During the project, I learned to use a lot of new software, for example using Brackets to write HTML, JavaScript and other code, using Python and Apache to add server-side functionality, and how to use various command line tools such as cp to copy files to a different directory, grep to search for text in text, curl to download data from a server, and sudo to run commands as the root user. I also learned how to effectively conduct research to improve my own work and how to efficiently communicate with my client through email to make sure that I’m on the right track. | |
Although I’m pretty happy with the product that I have produced, I think that it would be better - as somebody mentioned in their feedback - if I found a better way to retrieve the list of Facebook posts in order to show attached pictures. I could also have worked a bit more on the content management system to make it easier to use. It is currently slightly confusing to use but could be improved with some tweaks. These are things that I might imp |
This file contains 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
def rand_item(my_list): | |
return(my_list[round(random.random() * (len(my_list) - 1))]) | |
''' | |
use it like so: | |
waffles_list = ["waffles", "are", "cool"] | |
random_word = rand_item(waffles_list) | |
(don't forget to import random) |
This file contains 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
._585- { | |
background-color: transparent; | |
border: 1px solid transparent; | |
} | |
._4w98._4w97, ._42ft._42fu { | |
display: none; | |
} | |
._586i { |
This file contains 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 rolleyroll = function(duration){ | |
var newStyleText = "@keyframes rolleyroll { from { transform: rotate(0) } to { transform: rotate(1turn) } }\n@-webkit-keyframes rolleyroll { from { -webkit-transform: rotate(0) } to { -webkit-transform: rotate(1turn) } }"; | |
var newStyleElem = document.createElement("style"); | |
newStyleElem.textContent = newStyleText; | |
document.head.appendChild(newStyleElem); | |
var elements = document.querySelectorAll("body, body *"); | |
for (var i = 0; i < elements.length; i++) { | |
var styleString = "rolleyroll " + (duration || 5) + "s infinite linear"; | |
elements[i].style.animation = styleString; |
This file contains 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/env python3 | |
from urllib.request import Request, urlopen | |
import sys | |
import os | |
import json | |
class color: | |
PURPLE = "\033[95m" | |
CYAN = "\033[96m" |
This file contains 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="members"> | |
<h2>Members</h2> | |
<p>These altruistic representatives of the student body are grouped into <strong>3 different factions</strong>. There are <strong>6 members</strong> in each of the democratically-elected cabinets and <strong>4 strategically-appointed inter-body liaisons</strong>.</p> | |
<ul class="module member-list"></ul> | |
</section> |