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
// ==UserScript== | |
// @name CORS Tutorial Reordering | |
// @namespace yijiang | |
// @description Reorder CORS tutorial ranking using drag and drop | |
// @include https://myaces.nus.edu.sg/cors/RankTutorialServlet | |
// @require https://ajax.googleapis.com/ajax/libs/jquery/1.12.4/jquery.min.js | |
// @require https://ajax.googleapis.com/ajax/libs/jqueryui/1.11.4/jquery-ui.min.js | |
// @version 1 | |
// @grant none | |
// ==/UserScript== |
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
from pprint import pprint | |
def find_majority(lst): | |
maj = majority(lst) | |
pprint(maj) | |
if len(maj) > 1: | |
return 'Not Found' | |
else: | |
return list(maj.keys())[0] |
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
// ==UserScript== | |
// @name Scrapes IVLE Course ID | |
// @namespace yijiang | |
// @version 1 | |
// @match https://ivle.nus.edu.sg/v1/lms/list_course.aspx?src=bm&code=&title=&lecName=&acadyear=2016%2f2017&semester=Semester+1&ModTitleExact=N&LecNameExact=N | |
// @grant none | |
// ==/UserScript== | |
function switchPage(page){ | |
$('#GV_Page2').val(page).change(); |
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
// | |
// Event.swift | |
// | |
/** | |
Typed event implementation from <http://blog.scottlogic.com/2015/02/05/swift-events.html> | |
Updated and improved for Swift 3 | |
## Usage | |
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
<?php | |
namespace App\Console\Commands; | |
use Illuminate\Console\Command; | |
use App\User; | |
class AddUser extends Command | |
{ | |
/** |
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
// ==UserScript== | |
// @name IVLE LMS Quiz taker | |
// @namespace yijiang | |
// @version 0.1 | |
// @description Completes IVLE LMS modules by randomly clicking on buttons | |
// @author Zhang Yijiang | |
// @match https://ivle.nus.edu.sg/Databank/LMS/* | |
// ==/UserScript== | |
(function(window){ |
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
echo file_get_contents('this_is_the_flag.php'); |
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
// NUSMods v2 timetable data extractor | |
var loaderTemplate = data => ` | |
var s = document.createElement('script'); | |
s.src = 'https://cdnjs.cloudflare.com/ajax/libs/localforage/1.5.5/localforage.min.js'; | |
s.onload = function() { | |
const data = ${data}; | |
let count = 0; |
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 c = ` | |
localStorage.clear(); | |
localStorage.setItem('reduxState', JSON.stringify(${localStorage.getItem('reduxState')})); | |
window.location.reload();`; | |
if (typeof copy === 'function') { | |
console.info('Go to https://deploy-preview-669--nusmods.netlify.com/ and paste the code that has been copied into the console'); | |
copy(c); | |
} else { | |
console.info('Go to https://deploy-preview-669--nusmods.netlify.com/ and paste this into the console'); |
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
[ | |
{ | |
"title": "Hyphen", | |
"description": "A call centre run by chatbots" | |
}, | |
{ | |
"title": "Aquapioneers Ecosystem", | |
"description": "Grow your zero-km food with aquaponics" | |
}, | |
{ |