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
| #restore from file | |
| Get-Content .\vscode.extensions | ForEach-Object {code --install-extension $_} | |
| #backup to file | |
| code --list-extensions > vscode.extensions |
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
| $extensions = | |
| 'aaravb.chrome-extension-developer-tools', | |
| 'andys8.jest-snippets', | |
| 'bradlc.vscode-tailwindcss', | |
| 'christian-kohler.npm-intellisense', | |
| 'cschlosser.doxdocgen', | |
| 'csstools.postcss', | |
| 'Dart-Code.dart-code', | |
| 'Dart-Code.flutter', | |
| 'DavidAnson.vscode-markdownlint', |
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
| #!/usr/bin/env node | |
| console.log('Welcome you just ran me with npx!'); |
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
| [ | |
| { | |
| owner: 'bcoe', | |
| repo: 'top-npm-users', | |
| description: ':star: Generate a list of top npm users by based on monthly downloads.', | |
| language: 'JavaScript', | |
| isFork: false, | |
| stargazers: 27, | |
| watchers: 27 | |
| } |
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
| function CSVToArray( data, delimiter = ',', omitFirstRow = false ) { | |
| return data | |
| .slice( omitFirstRow ? data.indexOf( '\n' ) + 1 : 0 ) | |
| .split( '\n' ) | |
| .map( v => v.split( delimiter ) ); | |
| } | |
| CSVToArray( 'a,b\nc,d' ); // [['a', 'b'], ['c', 'd']]; | |
| CSVToArray( 'a;b\nc;d', ';' ); // [['a', 'b'], ['c', 'd']]; | |
| CSVToArray( 'col1,col2\na,b\nc,d', ',', true ); // [['a', 'b'], ['c', 'd']]; |
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
| (function (modules, global) { | |
| var cache = {}, require = function (id) { | |
| var module = cache[id]; | |
| if (!module) { | |
| module = cache[id] = {}; | |
| var exports = module.exports = {}; | |
| modules[id].call(exports, require, module, exports, global); | |
| } | |
| return module.exports; | |
| }; |
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 Memwatch = require('memwatch-next'); | |
| const Util = require('util'); | |
| if (Config.env === 'production') { | |
| /** | |
| * Check for memory leaks | |
| */ | |
| let hd = null; | |
| Memwatch.on('leak', (info) => { |
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
| function ceaser_cipher(){ | |
| this.alphabets=['a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z']; | |
| } | |
| ceaser_cipher.prototype.encrypt=function(s,n){ | |
| var plain_text=[...s]; | |
| for(var i = 0, length1 = plain_text.length; i < length1; i++){ | |
| plain_text[i]=this.alphabets[this.alphabets.indexOf(plain_text[i])+n]; | |
| } | |
| return plain_text.toString(); |
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 net = require('net'); | |
| // creates the server | |
| var server = net.createServer(); | |
| //emitted when server closes ...not emitted until all connections closes. | |
| server.on('close',function(){ | |
| console.log('Server closed !'); | |
| }); |
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
| // ==UserScript== | |
| // @name Stack Overflow Copy Code | |
| // @namespace https://t.me/OneFinalHug | |
| // @version 0.2 | |
| // @description Add copy button to copy code inside Stack Overflow answers | |
| // @author OFH | |
| // @match https://stackoverflow.com/questions/* | |
| // @grant none | |
| // ==/UserScript== |