- Date format([[]YYYY-MM-DDTHH:mm:ss.SSSZ[]:])
- File Icons
- Git Plus
- Linter eslint
- Linter
- MiniMap
- Pigemnts
- React
This file contains hidden or 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
// Currently works for jpeg only, | |
// CROS should be enable | |
// JPEG SPECS: | |
// http://vip.sugovica.hu/Sardi/kepnezo/JPEG%20File%20Layout%20and%20Format.htm | |
async function getSize(url) { | |
const response = await fetch(url); | |
const reader = response.body.getReader(); | |
const {value, done} = await reader.read(); |
This file contains hidden or 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
const APP_PREFIX = 'repo-name' | |
const VERSION = '0.0.0.1' | |
const CACHE_NAME = APP_PREFIX + VERSION | |
const URLS = [ | |
'/repo-name/', | |
'/repo-name/index.html', | |
'/repo-name/main.css', | |
'/repo-name/sw.js', | |
] | |
self.addEventListener('install', e => e.waitUntil(swInstall())) |
This file contains hidden or 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
Output:Recording: | |
Format: mkv | |
Recorder: x264 | |
Rate Control: CBR | |
BitRate: 1500 | |
CPUUsages: Medium | |
Video: | |
BaseRes: 1440x900 | |
OutputRes: 1440x900 |
This file contains hidden or 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
ufw status # list firwall status | |
ufw allow 81/tcp # open 81 port | |
ufw deny 81/tcp # deny 81 port | |
ufw delete allow 81/tcp # Delete 81 port rule | |
ufw delete deny 81/tcp # Delete 81 port rule | |
netstat -tulpn # list processes assigned to port | |
This file contains hidden or 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
# Create new user and add keys | |
adduser sammy | |
usermod -aG sudo sammy | |
su - sammy | |
mkdir ~/.ssh | |
chmod 700 ~/.ssh | |
nano ~/.ssh/authorized_keys # add public key by copy and paste | |
chmod 600 ~/.ssh/authorized_keys |
This file contains hidden or 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 fs = require('fs'); | |
const path = process.argv[2]; | |
console.log('\n\nRunning script...'); | |
if (!path) { | |
console.log('Please provide a path'); | |
process.exit(); | |
} |
module.js
var x = 10;
var y = 20;
export {x, y};
export default x;
main.js
This file contains hidden or 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 SomeClass = (function () { | |
//private vars | |
var bar = 1; | |
//constructor | |
var SomeClass = function () { | |
} | |
//public api | |
var exports = SomeClass.prototype; |
NewerOlder