Skip to content

Instantly share code, notes, and snippets.

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

Lakhveer Bawa lakhbawa

🏠
Working from home
View GitHub Profile
@tatsuyasusukida
tatsuyasusukida / !README-javascript-media-video.md
Last active February 21, 2025 10:12
🎥 How to record a video with JavaScript [demo video available]

🎥 How to record a video with JavaScript [demo video available]

Demo video: How to record a video with JavaScript

About this article

This article describes how to shoot a video from JavaScript using the MediaStream Recording API. The related resources are shown below.

@lakhbawa
lakhbawa / AnyVueComponent.vue
Created August 11, 2020 13:45
Vuex Design for better maintainability and reusability
this.$store
.dispatch('modules/auth/switchAccount', {
queryParams: {
new_account_type: newAccountType,
},
})
.then((response) => {
if (response.success) {
this.$buefy.toast.open({
message: response.message,
@bansalankit92
bansalankit92 / apache_kafka_interview_questions.md
Last active April 27, 2025 06:07
50 Apache Kafka Interview Questions and Answers for all experience level

(Q.1) What is Apache Kafka?

Apache Kafka is a publish-subscribe open source message broker application. This messaging application was coded in “Scala”. Basically, this project was started by the Apache software. Kafka’s design pattern is mainly based on the transactional logs design. For detailed understanding of Kafka, go through,
Kafka Tutorial.

(Q.2) Enlist the several components in Kafka.

The most important elements of Kafka are:

  • Topic – Kafka Topic is the bunch or a collection of messages.
  • Producer – In Kafka, Producers issue communications as well as publishes messages to a Kafka topic.
  • Consumer – Kafka Consumers subscribes to a topic(s) and also reads and processes messages from the topic(s).
@manuelselbach
manuelselbach / README.md
Last active January 28, 2025 01:21
xdebug docker on macOS with PhpStorm

Use xdebug with docker on macOS and PhpStorm

To use xdebug with macOS and docker is quite, let´s call it tricky ;)

The following steps need to be proceed to get it working:

  1. use the config from the xdebug.ini wihtin your docker web container. Important: set remote_connect_back to off

UPDATE

1. Install bundle https://github.com/tehplague/swiftmailer-mailgun-bundle
2. Follow instructions to this bundle
cspoo_swiftmailer_mailgun:
key: "key-xxxxxxxxxx"
domain: "mydomain.com"
http_client: 'httplug.client'(This is required field)
# Swiftmailer Configuration
swiftmailer:
transport: "mailgun"
@mandiwise
mandiwise / Update remote repo
Last active April 27, 2025 11:53
Transfer repo from Bitbucket to Github
// Reference: http://www.blackdogfoundry.com/blog/moving-repository-from-bitbucket-to-github/
// See also: http://www.paulund.co.uk/change-url-of-git-repository
$ cd $HOME/Code/repo-directory
$ git remote rename origin bitbucket
$ git remote add origin https://github.com/mandiwise/awesome-new-repo.git
$ git push origin master
$ git remote rm bitbucket
@travisvalentine
travisvalentine / steps.md
Last active June 10, 2023 19:00
Setup Facebook app to test authentication locally (aka, setting up App Domain)

Note: I had issues with setting up my Facebook app so authentication would work. I'd receive the error at the bottom, and it took me a while to figure out what was wrong

Here are the steps I took:

  • Go to http://developers.facebook.com/, create, and setup your app
  • When inside the dashboard, click "Settings"
  • Click "Add Platform"
  • Choose website (for authentication via the web app)
  • Add http://localhost:3000/ as "Site URL" (and "Mobile URL" if necessary)
  • Add localhost to "App Domains" above
@smebberson
smebberson / .gitignore
Created January 9, 2012 06:46
Express simple authentication example
node_modules
*.swp