Skip to content

Instantly share code, notes, and snippets.

View sadeghbarati's full-sized avatar
🍉

Sadegh Barati sadeghbarati

🍉
  • Iran, Mashhad
  • 22:30 (UTC +03:30)
View GitHub Profile
@sadeghbarati
sadeghbarati / npm-canary.md
Created June 19, 2022 08:22 — forked from zephraph/npm-canary.md
Publish a canary package on NPM
  • Update package.json by running yarn version --prerelease --preid=canary
  • Run npm publish --tag canary to publish the package under the canary tag
  • Run yarn add @artsy/reaction@canary to install canary package

Running npm dist-tag ls can be helpful to see what tagged packages are available

@sadeghbarati
sadeghbarati / reset.css
Created June 20, 2022 18:18 — forked from EllyLoel/reset.css
CSS Reset
/*
Made by Elly Loel - https://ellyloel.com/
With inspiration from:
- Josh W Comeau - https://courses.joshwcomeau.com/css-for-js/treasure-trove/010-global-styles/
- Andy Bell - https://piccalil.li/blog/a-modern-css-reset/
- Adam Argyle - https://unpkg.com/[email protected]/normalize.min.css / https://codepen.io/argyleink/pen/KKvRORE
Notes:
- `:where()` is used to lower specificity for easy overriding.
*/
$.fn.select2.amd.define('select2/data/extended-ajax',['./ajax','./tags','../utils','module','jquery'], function(AjaxAdapter, Tags, Utils, module, $){
function ExtendedAjaxAdapter ($element,options) {
//we need explicitly process minimumInputLength value
//to decide should we use AjaxAdapter or return defaultResults,
//so it is impossible to use MinimumLength decorator here
this.minimumInputLength = options.get('minimumInputLength');
this.defaultResults = options.get('defaultResults');
ExtendedAjaxAdapter.__super__.constructor.call(this,$element,options);

Conventional Commit Messages

See how a minor change to your commit message style can make a difference. Examples

Have a look at CLI util git-conventional-commits to ensure this conventions and generate changelogs

Commit Formats

Default

@sadeghbarati
sadeghbarati / svelte.md
Created July 26, 2022 03:56 — forked from peltho/svelte.md
Svelte cheatsheet
@sadeghbarati
sadeghbarati / YouTube_auto_subscriber.js
Created July 26, 2022 04:07 — forked from FUNExtreme/YouTube_auto_subscriber.js
YouTube Auto Subscriber which can be used to transfer your subscriptions from one account to another.
/*
* DESCRIPTION
* This script will go through all the subscription buttons on the YouTube page you execute it on, and subscribes to the ones that
* you're not subscribed to yet.
* A random delay is added to each subscription request, this is due to the fact that YouTube starts blocking subscriptions after
* a certain number of consecutive requests. Randomising the delays should trick the detection into thinking it's a valid user doing
* the requests.
*
* HOW TO USE
* Navigate to the page containing the channels you would like to subscribe to. (The subscribe button should be visible!)
@sadeghbarati
sadeghbarati / puppeteer_youtube.js
Created July 26, 2022 04:21 — forked from tnolet/puppeteer_youtube.js
Puppeteer search youtube
const puppeteer = require('puppeteer')
const screenshot = 'youtube_fm_dreams_video.png'
try {
const browser = await puppeteer.launch()
const page = await browser.newPage()
await page.goto('https://youtube.com')
await page.type('#search', 'Fleetwood Mac Dreams')
await page.click('button#search-icon-legacy')
await page.waitForSelector('ytd-thumbnail.ytd-video-renderer')
@sadeghbarati
sadeghbarati / gsi-with-nuxt.md
Created November 2, 2022 11:30 — forked from srestraj/gsi-with-nuxt.md
Integrate Google Sign-in and One-tap with Nuxt.js

Integrate Google Sign-in (Popup method) with Nuxt.js - Works in Incognito mode as well

Nuxt 3 version here.
Add GSI client in your nuxt.config.js
export default {
  ...