[Insert project name]
I hereby claim:
- I am yangshun on github.
- I am yangshun (https://keybase.io/yangshun) on keybase.
- I have a public key ASALzkiMtwtQ1tT2loY5YKoN54yysqWWF7TLUB8ai024BAo
To claim this, I am signing this object:
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
'use strict'; | |
const {useCallback, useState} = require('React'); | |
const nullthrows = require('nullthrows'); | |
type InputValue<T> = {| | |
// Whether the input value has changed since it was initialized. | |
changed: boolean, | |
// A string key to uniquely identify the value. |
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
#!/bin/bash | |
text="/** | |
* Copyright (c) 2017-present, Facebook, Inc. | |
* | |
* This source code is licensed under the MIT license found in the | |
* LICENSE file in the root directory of this source tree. | |
*/ | |
" |
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
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( |
- SSH into the server
cd ~/nusmods/www
git pull
yarn && npm run build
- Check on https://staging.nusmods.com
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
let res = ''; | |
$('#question_list tbody tr').each(function () { | |
const $td = $(this).find('td'); | |
const $link = $($td[2]).find('a').first(); | |
res += `[${$($td[1]).text().trim()} - ${$link.text()}](https://leetcode.com${$link.attr('href')})\n`; | |
}); | |
console.log(res); |
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
# 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 |
NewerOlder