-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
246 additions
and
54 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
start_date: 2017-01-20 18:00:00 +0800 | ||
hacks: | ||
- venue: The Hangar by NUS Enterprise | ||
topics: | ||
- speaker: Fazli Sapuan | ||
from: Garena | ||
title: The Art of Lockpicking | ||
- speaker: Wang Chen | ||
from: SAP | ||
title: Smart Enterprise Software Empowered by Machine Learning | ||
- nohack: CNY Eve | ||
- venue: SR3, Town Plaza, University Town, NUS | ||
topics: | ||
- speaker: Jethro Kuan | ||
from: NUS Hackers | ||
title: 'Realtime Collaboration: A Brief History' | ||
- speaker: Wang Leng | ||
from: NUS School of Computing | ||
title: Cross Site Scripting | ||
- venue: SR3, Town Plaza, University Town, NUS | ||
topics: | ||
- speaker: Ding Feng | ||
from: NUS CS | ||
title: 'Hardware Hacks: The Whys and Hows' | ||
- speaker: Raghav Sood | ||
from: IBM Blockchain Innovation Center | ||
title: 'Wi-Fi Hacks: Hacking the Air Around Us' | ||
- venue: SR3, Town Plaza, University Town, NUS | ||
topics: | ||
- speaker: Emil Tan | ||
from: Edgis | ||
title: My Love-Hate Relationship with Honeypot | ||
- speaker: Sunny Neo | ||
from: BT Security | ||
title: Web Security for Developers | ||
- nohack: Recess Week | ||
- venue: The Hangar by NUS Enterprise | ||
topics: | ||
- speaker: Kee Wee Teng | ||
from: FSTD, MINDEF | ||
title: An Introduction to DIY Laser Cutters | ||
- speaker: Francis Regan, Xinxin Du and Shabbir | ||
from: Ionic3DP | ||
title: The Kappa 3D Printer | ||
- venue: The Hangar by NUS Enterprise | ||
topics: | ||
- speaker: Virgil Griffith | ||
from: Legalese | ||
title: Bitcoin, Darkweb, Ethereum and LegalTech | ||
- venue: SR5, Town Plaza, University Town, NUS | ||
topics: | ||
- speaker: John L. Gustafson | ||
from: NUS | ||
title: Weapons of Math Destruction | ||
- venue: SR5, Town Plaza, University Town, NUS | ||
topics: | ||
- speaker: Abhilash Murthy | ||
from: Bus Uncle | ||
title: How to Build a Bot People Will Love | ||
- speaker: Coreteam | ||
from: NUS Hackers | ||
title: Panel Discussion - Summer Plans | ||
- venue: i-Cube Building Auditorium, NUS | ||
topics: | ||
- speaker: Jeff Moss | ||
from: DEFCON & BlackHat | ||
title: A Sharing on Cyber Security | ||
- speaker: Halvar Flake | ||
from: Google | ||
title: Another Sharing on Cyber Security | ||
- venue: SR5, Town Plaza, University Town, NUS | ||
topics: | ||
- speaker: Peter Hoeg | ||
from: Speartail | ||
title: '(Programming your OS && ignoring state) == bliss' | ||
- speaker: Vishnu Prem | ||
from: Coreteam | ||
title: 'Row Hammer: Flipping Bits in Memory Without Accessing Them' | ||
- nohack: Good Friday |
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
(function toggleShowMore() { | ||
const SECOND = 10 * 100; | ||
const TWENTY_FOUR_HOURS = 24 * 60 * 60 * SECOND; | ||
const TWO_WEEKS = 2 * 7 * TWENTY_FOUR_HOURS; | ||
const HIDE_TEXT = 'Hide'; | ||
const VISUALLY_HIDDEN_CLASS_NAME = 'visually-hidden'; | ||
const HIDDEN_CLASS_NAME = 'item-hidden'; | ||
const NOW = new Date(); | ||
const NO_EVENTS_NOTICE = (function() { | ||
const div = document.createElement('div'); | ||
div.innerText = 'No events'; | ||
return div; | ||
})(); | ||
|
||
// Store events beyond two weeks to be toggled | ||
const eventsByListIndex = []; | ||
|
||
const lists = document.querySelectorAll('.events > .list'); | ||
const buttons = document.querySelectorAll('.events-button'); | ||
|
||
lists.forEach((list, index) => { | ||
const futureEvents = []; | ||
list.querySelectorAll('.item').forEach(event => { | ||
const dateString = event.querySelector('time').getAttribute('datetime'); | ||
const date = new Date(dateString); | ||
|
||
// Remove events that have already occured (with buffer) | ||
const isPastEvent = NOW - date > TWENTY_FOUR_HOURS / 4; | ||
if (isPastEvent) { | ||
event.remove(); | ||
} | ||
|
||
// Hide events that are more than two weeks ahead | ||
const isWithinTwoWeeks = date - NOW < TWO_WEEKS; | ||
if (!isWithinTwoWeeks) { | ||
event.classList.add(HIDDEN_CLASS_NAME, VISUALLY_HIDDEN_CLASS_NAME); | ||
futureEvents.push(event); | ||
} | ||
}); | ||
|
||
if (!futureEvents.length) { | ||
list.parentNode.appendChild(NO_EVENTS_NOTICE); | ||
buttons[index].remove(); | ||
} | ||
eventsByListIndex[index] = futureEvents; | ||
}); | ||
|
||
buttons.forEach(function(button, index) { | ||
const initialText = button.textContent; | ||
button.addEventListener('click', function click(ele) { | ||
// Toggle text of button | ||
const elementText = | ||
ele.target.textContent === initialText ? HIDE_TEXT : initialText; | ||
ele.target.textContent = elementText; | ||
|
||
// Toggle visibility of events | ||
const events = eventsByListIndex[index]; | ||
events.forEach((event, index) => { | ||
event.classList.toggle(VISUALLY_HIDDEN_CLASS_NAME); | ||
setTimeout(() => { | ||
event.classList.toggle(HIDDEN_CLASS_NAME); | ||
}, 30 * index); | ||
}); | ||
}); | ||
}); | ||
})(); |
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
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