Skip to content

Instantly share code, notes, and snippets.

View 01fade's full-sized avatar

Hang Do Thi Duc 01fade

View GitHub Profile
@01fade
01fade / commons_api_attribution.js
Last active October 1, 2021 23:15
Use node to get bulk attributions (title, author, license) from Commons API
const fetch = require('node-fetch');
var fs = require('fs');
// just get the last part of Commons url from browser
// there might be a limit, if so build a loop
var list = [
"OOjs_UI_icon_language-ltr.svg",
"Flight_of_the_Bumblebee_on_Pipe_Organ_Pedals.webm",
"Happy_20th_birthday,_Wikipedia!_%E2%80%93_International_(subtitled)_version.webm"
];
var result = [];
var imageList = [
"https://unsplash.it/200/300?image=100",
"https://unsplash.it/200/300?image=129",
"https://unsplash.it/200/300?image=199",
"https://unsplash.it/200/300?image=178",
"https://unsplash.it/200/300?image=135",
"https://unsplash.it/200/300?image=134",
"https://unsplash.it/200/300?image=174",
"https://unsplash.it/200/300?image=112",
"https://unsplash.it/200/300?image=126",
/* moderate */
@import url('https://fonts.googleapis.com/css?family=Roboto+Mono|Roboto:400,700');
/* fast */
@import url(https://fonts.googleapis.com/css?family=Roboto+Mono:400,700);
@import url(https://fonts.googleapis.com/css?family=Roboto:400,700);
function minmax(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
@01fade
01fade / default-preferences.sublime-settings
Last active May 2, 2017 14:10
preferences for sublime
// Place your settings in the file "Packages/User/Preferences.sublime-settings",
// which overrides the settings in here.
//
// Settings may also be placed in syntax-specific setting files, for
// example, in Packages/User/Python.sublime-settings for python files.
{
// Sets the colors used within the text area
"color_scheme": "Packages/Color Scheme - Default/Monokai.tmTheme",
// Note that the font_face and font_size are overridden in the platform