Skip to content

Instantly share code, notes, and snippets.

Avatar
🎯
focus

Xvezda

🎯
focus
View GitHub Profile
@Xvezda
Xvezda / snippet.js
Last active Apr 22, 2021
통신사 IP의 준말로 '"통피"'라고 부르기도 한다. - https://namu.wiki/w/%ED%86%B5%EC%8B%A0%EC%82%AC%20IP
View snippet.js
function iterateIPRange(start, end) {
const prefix = start.split('.')[0]
console.assert(prefix === end.split('.')[0])
const from = start.split('.')[1]
const to = end.split('.')[1]
const results = []
for (let i = from; i <= to; ++i) {
results.push([prefix, i].join('.'))
}
return results
View pagechange.user.js
// ==UserScript==
// @name Custom page change event
// @namespace http://xvezda.com/
// @version 0.1
// @description fire event on page changed.
// @author Xvezda
// @match http://*/*
// @grant none
// ==/UserScript==
View file-extension-to-mime-types.json
{
".123" : "application/vnd.lotus-1-2-3",
".3dml" : "text/vnd.in3d.3dml",
".3g2" : "video/3gpp2",
".3gp" : "video/3gpp",
".a" : "application/octet-stream",
".aab" : "application/x-authorware-bin",
".aac" : "audio/x-aac",
".aam" : "application/x-authorware-map",
".aas" : "application/x-authorware-seg",
View README.txt
# Created by fist; The fast gist uploader - https://github.com/Xvezda/fist
View README.txt
# Created by fist; The fast gist uploader - https://github.com/Xvezda/fist
@Xvezda
Xvezda / column2markdown.sh
Created Jan 17, 2021
COLUMN(1) to MarkDown table with SED(1)
View column2markdown.sh
#!/bin/bash
sed -e 's/[[:space:]][[:space:]]\([^[:space:]]\)/ \| \1/g' -e 's/^/\| /' -e 's/$/ \|/'
@Xvezda
Xvezda / README.txt
Created Jan 3, 2021
Created by fist; The fast gist uploader - https://github.com/Xvezda/fist
View README.txt
# Created by fist; The fast gist uploader - https://github.com/Xvezda/fist
@Xvezda
Xvezda / test.js
Last active Oct 11, 2020
Minimal JavaScript test setup
View test.js
#!/usr/bin/env node
/*!
* Copyright (c) 2020 Xvezda <xvezda@naver.com>
*
* Use of this source code is governed by an MIT-style
* license that can be found in the LICENSE file or at
* https://opensource.org/licenses/MIT.
*/
function ordinal(i) {
@Xvezda
Xvezda / gulpfile.js
Created Oct 10, 2020
See what gulp src method pushing
View gulpfile.js
const { src, dest } = require('gulp');
exports.default = function(cb) {
src('src/*').on('data', function(chunk) {
console.log(chunk);
});
cb();
};
@Xvezda
Xvezda / diff_subshell.sh
Last active Sep 10, 2020
Diffing two different subshell (process substitution)
View diff_subshell.sh
#!/usr/bin/env bash
diff <( echo -e 'foo\nbar\n' ) <( echo -e 'foo\nbaz\n' )