Skip to content

Instantly share code, notes, and snippets.

View abhishekbhalani's full-sized avatar
🎄
working on latest framework...

Abhishek B. abhishekbhalani

🎄
working on latest framework...
View GitHub Profile
@iDevelopThings
iDevelopThings / DragDrop.vue
Last active July 16, 2024 15:16
Handles drag and drop file upload in VueJS
<!-- USAGE -->
<drag-drop-file-upload ref="dragDropFileUpload" @handleInput="changeImage"></drag-drop-file-upload>
//Handle image change/upload etc
changeImage({file, filePreview}) {
console.log({file, filePreview});
},
//Clear files added/dropped onto component?
@aleclarson
aleclarson / rollup-typescript.md
Last active February 28, 2025 16:13
The best Rollup config for TypeScript libraries

It's 2024. You should use tsup instead of this.


Features

🔥 Blazing fast builds
😇 CommonJS bundle
🌲 .mjs bundle
.d.ts bundle + type-checking

@SackeyDavid
SackeyDavid / gist:d24315dd844d51b3e70af062fdcf5941
Created September 19, 2021 03:04
Turing Coding Challenge Practise Test - Problem 2
// console.log("Hello, World!");
var countElements = function(arr) {
var result = 0;
// output = 0;
// count elements
for (var i = 0; i < arr.length; i++) {
if(arr.includes(arr[i] + 1)) {
result+= 1
}
@abhishekbhalani
abhishekbhalani / 1_README.md
Created September 5, 2022 12:12 — forked from Daniel15/1_README.md
Complete Google Drive File Picker example

Google Drive File Picker Example

This is an example of how to use the Google Drive file picker and Google Drive API to retrieve files from Google Drive using pure JavaScript. At the time of writing (14th July 2013), Google have good examples for using these two APIs separately, but no documentation on using them together.

Note that this is just sample code, designed to be concise to demonstrate the API. In a production environment, you should include more error handling.

See a demo at http://stuff.dan.cx/js/filepicker/google/

@akatakritos
akatakritos / AddMassTransitOutboxTablesPostgres.sql
Last active October 6, 2024 21:46
Postgres schema migration script for MassTransit transactional outbox tables
-- https://github.com/MassTransit/MassTransit/discussions/4847
CREATE TABLE inbox_state
(
id bigint GENERATED BY DEFAULT AS IDENTITY,
message_id uuid NOT NULL,
consumer_id uuid NOT NULL,
lock_id uuid NOT NULL,
row_version bytea,
received timestamp with time zone NOT NULL,
receive_count integer NOT NULL,