Skip to content

Instantly share code, notes, and snippets.

View githubrakesh's full-sized avatar
🏠
Working from home

Rakesh githubrakesh

🏠
Working from home
View GitHub Profile
@jesterjunk
jesterjunk / yt-dlp.conf.md
Last active December 22, 2023 15:04
yt-dlp.conf


yt-dlp.conf


@Sawaba
Sawaba / javainstall.sh
Created March 6, 2019 16:02
Java JDK 11 install script for Windows Subsystem for Linux (WSL)
#!/bin/bash
# This script adapted from an older post on StackOverflow by user fieldju
# https://stackoverflow.com/questions/36478741/installing-oracle-jdk-on-windows-subsystem-for-linux
# The script was for JDK 8.
# Due to major changes with JDK 11 (no JRE, no Derby, Unlimited Strength included), it was necessary to update the entire script.
set -ex
# UPDATE THESE URLs (this one updated as of 2019-03-06)
export JDK_URL=http://download.oracle.com/otn-pub/java/jdk/11.0.2+9/f51449fcd52f4d52b93a989c5c56ed3c/jdk-11.0.2_linux-x64_bin.tar.gz
@killants
killants / findPaths.js
Last active November 10, 2022 04:34
Sharing knowledge
/**
* searches deep into an object recursively...
* @param {Object} obj object to be searched
* @param {any} searchValue the value/key to search for
* @param {Object} [options]
* @param {boolean} options.[searchKeys] whether to search object keys as well as values. Defaults to `true` if `serchValue` is a string, `false` otherwise.
* @param {number} options.[maxDepth=20] maximum recursion depth (to avoid "Maximum call stack size exceeded")
* @returns {string[]} Paths on the object to the matching results
*/
const findPaths = (
@ncochard
ncochard / babel-webpack.md
Last active September 29, 2023 05:15
The correct way to compile ES6 using babel...

When you create a npm package, remember it might be used in a browser or a server, or even a command line utility… For each package you create, please pay attention at what it will be used for:

  1. Is it going to be used as a dependency to a nodejs application that is not bundled? (e.g. command line utilities)
  2. Is it going to be used as a dependency to a nodejs application that is bundled? (e.g. AWS Lambdas)
  3. Is it going to be used as a dependency to a browser application (always bundled)?.
  • In cases 2) and 3) you want to allow for tree shaking.
  • In cases 1) and 2) you want to benefit from the "ES6"/"ES next" features supported natively by nodejs.
  • In case 3) you also want to benefit from the native support of "ES6" from your browser.
@JamesMessinger
JamesMessinger / set-next-request.js
Created July 27, 2017 19:24
setNextRequest() example
var customer = JSON.parse(responseBody);
if (customer.id === undefined) {
// No customer was returned, so don't run the rest of the collection
postman.setNextRequest(null);
}
else {
// Save the customer ID to a Postman environment variable
postman.setEnvironmentVariable("cust_id", customer.id);
@chunter
chunter / pageant-autoload-keys-at-startup.txt
Created June 20, 2017 10:51
Make Pageant autoload keys at startup
To make Pageant automatically run and load keys at startup:
- Find the location of pageant.exe
- Windows key + R to open the 'run' dialog box
- Type: 'shell:startup' in the dialog box
- Create a shortcut to the pageant.exe and put into this startup folder.
@neloe
neloe / testcode.js
Created May 16, 2017 18:19
No commit conflict?
//unit test
it('Pull with commit conflict', function() {
var key = totest.vcs.credentials(creds.pubkey, creds.privkey, creds.passphrase);
var key2 = totest.vcs.credentials(creds.pubkey, creds.privkey, creds.passphrase);
var key3 = totest.vcs.credentials(creds.pubkey, creds.privkey, creds.passphrase);
var repo;
var oldrepo;
var newoid;
var newline = 'modified on' + Date.now()+'\n';
@leonardofed
leonardofed / README.md
Last active April 29, 2024 10:49
A curated list of AWS resources to prepare for the AWS Certifications


A curated list of AWS resources to prepare for the AWS Certifications

A curated list of awesome AWS resources you need to prepare for the all 5 AWS Certifications. This gist will include: open source repos, blogs & blogposts, ebooks, PDF, whitepapers, video courses, free lecture, slides, sample test and many other resources.


@JamesMessinger
JamesMessinger / README.md
Last active March 9, 2024 17:58
VSCode GitHub Markdown Theme

GitHub Markdown Theme for Visual Studio Code

This CSS stylesheet allows you to preview markdown files in VSCode using GitHub's mardown theme. This CSS was taken directly from the official GitHub Markdown repo. I replaced their top-level .markdown-body class with the body tag so it would work in VSCode, and added styling for the html tag to match GitHub's fixed-width container.

Instructions

  1. Copy the CSS file to your computer
    Copy the github-markdown.css file below to your computer. You can put it anywhere you want, but I chose to put it in the same folder as my VSCode settings file.

  2. Edit your VSCode settings
    If you want to use this theme for all of your projects, then edit your User Settings file. If you just want to use this them

@d2s
d2s / installing-node-with-nvm.md
Last active March 13, 2024 12:09
Installing Node.js to Linux & macOS & WSL with nvm

Installing Node.js with nvm to Linux & macOS & WSL

A quick guide on how to setup Node.js development environment.

Install nvm for managing Node.js versions

nvm allows installing several versions of Node.js to the same system. Sometimes applications require a certain versions of Node.js to work. Having the flexibility of using specific versions can help.

  1. Open new Terminal window.