Skip to content

Instantly share code, notes, and snippets.

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

Apurba Podder apurbajnu

🏠
Working from home
  • Bangladesh , Dhaka
View GitHub Profile
@irazasyed
irazasyed / README.md
Last active January 22, 2024 06:16
Instructions on How to use Cloudflare Argo Tunnel to Share Laravel Valet Site on macOS and Helper Bash Script

How to use Cloudflare Argo Tunnel to Share Laravel Valet Site on macOS

Set up a tunnel locally

1. Download and install cloudflared

brew install cloudflare/cloudflare/cloudflared
@oranges13
oranges13 / RegistrationController.php
Created April 23, 2018 16:21
Populate external drop downs for datatable filtering
/**
* Process datatables ajax request.
*
* @return \Illuminate\Http\JsonResponse
*/
public function allData(Request $request)
{
$registrations = Registration::with('product')->with('reg_type')->select('registrations.*');
$datatable = Datatables::of($registrations);
@hasinhayder
hasinhayder / charlie-foxtrot.go
Last active May 20, 2020 19:16
converts a string to NATO phonetic alphabet equivalents
/* Charlie Foxtrot - If You Know What It Means ;) */
package main
import (
"fmt"
"strings"
"bufio"
"os"
)
{
"Kwajalein":"(GMT-12:00) International Date Line West",
"Pacific\/Midway":"(GMT-11:00) Midway Island",
"Pacific\/Samoa":"(GMT-11:00) Samoa",
"Pacific\/Honolulu":"(GMT-10:00) Hawaii",
"America\/Anchorage":"(GMT-09:00) Alaska",
"America\/Los_Angeles":"(GMT-08:00) Pacific Time (US & Canada)",
"America\/Tijuana":"(GMT-08:00) Tijuana, Baja California",
"America\/Denver":"(GMT-07:00) Mountain Time (US & Canada)",
"America\/Chihuahua":"(GMT-07:00) Chihuahua",
@rayrutjes
rayrutjes / ais-wp.css
Created July 7, 2016 12:48
Some boilerplate to create an instantsearch.js search experience in your WordPress theme. This works in combination with the Algolia Search plugin for WordPress.
#ais-wrapper {
display: flex;
}
#ais-main {
padding: 1rem;
width: 100%;
}
@ourmaninamsterdam
ourmaninamsterdam / LICENSE
Last active April 24, 2024 18:56
Arrayzing - The JavaScript array cheatsheet
The MIT License (MIT)
Copyright (c) 2015 Justin Perry
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
@benjasHu
benjasHu / jquery-plugin.js
Last active March 13, 2021 07:36
ES6 Module jQuery Plugin Definition
import pluginify from 'pluginify';
class Plugin {
constructor() {
/* ... */
}
}
/*
Convert plugin class into a jQuery plugin
@kjohnson
kjohnson / ninja-forms-add-email-attachment.php
Created March 13, 2015 15:37
Add an Attachment to Email Notifications in Ninja Forms
<?php
/*
Plugin Name: Ninja Forms Email Attachment
*/
function add_my_attachment( $attachments ) {
$attachments[] = 'server_path_to_my_file';
return $attachments;
}
@garveen
garveen / bigfileUpload.php
Last active April 4, 2022 17:56
using html 5 APIs, slice big file into blob and upload
<?php
/*
you may modify:
php:
filename
file max size
buf size
how long to wait
@hasinhayder
hasinhayder / envato-screenshots-downloader.php
Last active November 14, 2017 18:37
Download large preview images from the envato item's screenshots page
#!/usr/bin/env php
<?php
//usage: php envato-screenshots-downloader.php /path/to/save/screenshots http://url/to/screenshots/page
set_time_limit(0);
$dir = $argv[1];
$source = $argv[2];
print_r($argv);
mkdir ($dir);
$src = file_get_contents($source);
$pattern = '/src="(https:\/\/0.s3[a-zA-Z0-9_\-\.\/%]+)"/i';