One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
(() => { | |
const storySubtitle = $$('.sub.header')[0].textContent; | |
const storyTitle = $$('h1.header')[0].textContent.replace(storySubtitle, ''); | |
const chapters = []; | |
[...$$('div[data-reactroot]')[0].children[1].children[0].children[1].children].forEach(chapterEl => { | |
const chapterObject = { title: null, sections: [] }; | |
const chapterChildren = chapterEl.children[0].children; | |
chapterObject.title = chapterChildren[0].textContent; |
/* | |
PoC WhatsApp enumeration of phonenumbers, profile pics, about texts and online statuses | |
Floated div edition | |
01-05-2017 | |
(c) 2017 - Loran Kloeze - loran@ralon.nl | |
This script creates a UI on top of the WhatsApp Web interface. It enumerates certain kinds | |
of information from a range of phonenumbers. It doesn't matter if these numbers are part | |
of your contact list. At the end a table is displayed containing phonenumbers, profile pics, | |
about texts and online statuses. The online statuses are being updated every |
# Place the ffmpeg binary in the same directory. | |
for video_file in *.mp4 | |
do | |
audio_file="${video_file/.mp4/.mp3}" | |
if [ -f "$audio_file" ]; then | |
echo "$audio_file exists." | |
else | |
echo "Converting $video_file to $audio_file." | |
./ffmpeg -i "$video_file" -vn -sn -c:a mp3 -ab 192k "$audio_file" | |
fi |
cd ~/nusmods/www
git pull
yarn && npm run build
module.exports = (babel) => { | |
const { types: t } = babel; | |
const GLOBAL_EXPOSURE_IDENTIFIER = 'babelPluginExportPrivates'; | |
const HOIST_PRAGMA = 'babel-plugin-export-privates'; | |
const identifiers = new Set(); | |
function attachToGlobalObject(path, identifierName) { | |
identifiers.add(identifierName); | |
// Attach to global object to be exposed for exporting later. | |
path.insertAfter( |
// Steps to share Coursera Quiz answers | |
// ===== | |
// 1. Open the web developer console. In Chrome, press ctrl/cmd + shift + J, in Firefox, press ctrl/cmd + shift + K | |
// 2. Copy the following code below and paste it in the console. Press enter. | |
// 3. Your answers will be printed out and you can share it with other people (: | |
// | |
(function () { | |
var answer = '\n'; |
module.exports = function (results) { | |
const rulesFreqs = {}; | |
results.forEach(file => { | |
file.messages.forEach(message => { | |
if (!rulesFreqs[message.ruleId]) { | |
rulesFreqs[message.ruleId] = 0; | |
} | |
rulesFreqs[message.ruleId] += 1; | |
}); | |
}); |
import random | |
import numpy as np | |
import numpy.linalg as la | |
import matplotlib.pyplot as plt | |
import time | |
import os | |
from math import * | |
from numpy import append, zeros | |
from scipy.io import wavfile |