Skip to content

Instantly share code, notes, and snippets.

View kingRayhan's full-sized avatar
😍
in relationship with console.log( )

Md Raihan kingRayhan

😍
in relationship with console.log( )
View GitHub Profile
@incredimike
incredimike / variousCountryListFormats.js
Last active May 31, 2024 23:54
List of Countries in various Javascript data structures: Alphabetical country lists & Country data objects.
// Lists of countries with ISO 3166 codes, presented in various formats.
// Last Updated: July 30, 2020
// If you're using PHP, I suggest checking out:
// https://github.com/thephpleague/iso3166
// or Laravel: https://github.com/squirephp/squire
//
// JS developers can check out:
// https://www.npmjs.com/package/iso3166-2-db
//
@aponxi
aponxi / sql-mongo_comparison.md
Last active February 21, 2024 11:56
MongoDb Cheat Sheets

SQL to MongoDB Mapping Chart

SQL to MongoDB Mapping Chart

In addition to the charts that follow, you might want to consider the Frequently Asked Questions section for a selection of common questions about MongoDB.

Executables

The following table presents the MySQL/Oracle executables and the corresponding MongoDB executables.

@mycodeschool
mycodeschool / Queue_CircularArrayImplementation.cpp
Last active May 25, 2024 10:46
Queue - Array Implementation
/* Queue - Circular Array implementation in C++*/
#include<iostream>
using namespace std;
#define MAX_SIZE 101 //maximum size of the array that will store Queue.
// Creating a class named Queue.
class Queue
{
private:
int A[MAX_SIZE];
সি এরজন্য এই দুইটা টিউটো ফলো করেন =>
http://url.mashpy.me/ctuto (শরীফ আহমেদ ১০১ টা টিউটরিয়াল)
http://url.mashpy.me/ctamim (তামিম শাহরিয়ার সুবিন)
প্রথম লিঙ্কে সি প্রোগ্রামিং এর বেসিক থেকে এডভান্স+প্রোগ্রামিং কনটেস্ট সম্পর্কে আলোচনা করা হয়েছে।
আর পরের লিঙ্কটা সি প্রোগ্রামিং এর একেবারে বেসিক জানতে সাহায্য করবে।
ভিডিও টিউটরিয়ালের পাশাপাশি নিটনের সবার জন্য সি বইটাও যদি কিনে পড়া শুরু করেন তাহলে অনেক ভাল হবে।
আর সি প্লাস প্লাসের জন্য বাংলাতে ভিডিও টিউটরিয়াল তেমন নাই without Bdgeeks.
http://url.mashpy.me/164 (বিডিগিকস ৪৫ টিউটরিয়াল)
@koomai
koomai / PhpStorm Keyboard Shortcuts.md
Last active May 25, 2024 01:05
Frequently Used PhpStorm Keyboard Shortcuts

Note: Some of these shortcuts have been remapped for my own convenience (Preferences->Keymap). These are Mac shortcuts, just use the Windows/Linux equivalent of the Cmd/Option/Ctrl/Del keys.

####Search, Go to, Navigation ####

Cmd + P - Search file

Cmd + Shift + O - Search everywhere

(I swapped the above two recently because I use Cmd + P to search for files most of the time).

@raddeus
raddeus / app.js
Last active May 24, 2023 15:41
Basic Express 4.0 Setup with connect-flash
var express = require('express');
var session = require('express-session');
var cookieParser = require('cookie-parser');
var flash = require('connect-flash');
var app = express();
app.use(cookieParser('secret'));
app.use(session({cookie: { maxAge: 60000 }}));
app.use(flash());
@e1024kb
e1024kb / gist:41bf38fdb1a2cb19a781
Created September 27, 2014 13:29
Country - state list in JSON
{
"countries": [
{
"country": "Afghanistan",
"states": ["Badakhshan", "Badghis", "Baghlan", "Balkh", "Bamian", "Daykondi", "Farah", "Faryab", "Ghazni", "Ghowr", "Helmand", "Herat", "Jowzjan", "Kabul", "Kandahar", "Kapisa", "Khost", "Konar", "Kondoz", "Laghman", "Lowgar", "Nangarhar", "Nimruz", "Nurestan", "Oruzgan", "Paktia", "Paktika", "Panjshir", "Parvan", "Samangan", "Sar-e Pol", "Takhar", "Vardak", "Zabol"]
},
{
"country": "Albania",
"states": ["Berat", "Dibres", "Durres", "Elbasan", "Fier", "Gjirokastre", "Korce", "Kukes", "Lezhe", "Shkoder", "Tirane", "Vlore"]
},
@pstoica
pstoica / OnBlurComponent.jsx
Last active August 1, 2023 21:00
onBlur for entire react element
function OnBlurComponent({ onBlur }) {
const handleBlur = (e) => {
const currentTarget = e.currentTarget;
// Check the newly focused element in the next tick of the event loop
setTimeout(() => {
// Check if the new activeElement is a child of the original container
if (!currentTarget.contains(document.activeElement)) {
// You can invoke a callback or add custom logic here
onBlur();
@paulirish
paulirish / bling.js
Last active May 1, 2024 19:56
bling dot js
/* bling.js */
window.$ = document.querySelectorAll.bind(document);
Node.prototype.on = window.on = function (name, fn) {
this.addEventListener(name, fn);
}
NodeList.prototype.__proto__ = Array.prototype;
@shlomohass
shlomohass / jQuery-mousewheel-direction-capture.js
Last active October 28, 2022 20:24
jQuery - Get mousewheel scroll event to detect scrolling direction cross browser
$('body').on('mousewheel DOMMouseScroll', function(e){
if(typeof e.originalEvent.detail == 'number' && e.originalEvent.detail !== 0) {
if(e.originalEvent.detail > 0) {
console.log('Down');
} else if(e.originalEvent.detail < 0){
console.log('Up');
}
} else if (typeof e.originalEvent.wheelDelta == 'number') {
if(e.originalEvent.wheelDelta < 0) {
console.log('Down');