Skip to content

Instantly share code, notes, and snippets.

View hassamulhaq's full-sized avatar

Hassam M hassamulhaq

View GitHub Profile
@mudge
mudge / eventemitter.js
Last active July 2, 2024 13:06
A very simple EventEmitter in pure JavaScript (suitable for both node.js and browsers).
/* Polyfill indexOf. */
var indexOf;
if (typeof Array.prototype.indexOf === 'function') {
indexOf = function (haystack, needle) {
return haystack.indexOf(needle);
};
} else {
indexOf = function (haystack, needle) {
var i = 0, length = haystack.length, idx = -1, found = false;
@pierandrea
pierandrea / Apps Script Code - Copy the edit response link from Google Forms entries into a Google Sheet
Last active October 19, 2023 19:25
Google Apps Script code to add Google Form edit response links to spreadsheet
@kreativan
kreativan / dropzone.php
Last active February 11, 2024 12:17
Upload files with dropzone.js and php
<?php
// process $_POST request
if(isset($_POST["submitDropzone"])) {
// Do something
print_r($_POST);
}
?>
@marksparrish
marksparrish / UserSeeder.php
Created October 17, 2021 17:03
User, Team Seeder for Laravel Jetstream with Teams
<?php
namespace Database\Seeders;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Hash;
use Illuminate\Database\Seeder;
use App\Models\Team;
use App\Models\User;
use Laravel\Jetstream\Jetstream;
class Users extends Seeder
{