Skip to content

Instantly share code, notes, and snippets.

View tojibon's full-sized avatar
:octocat:
Finalizing

Juyal Ahmed tojibon

:octocat:
Finalizing
View GitHub Profile
@tojibon
tojibon / Install.md
Last active February 11, 2024 01:52
Installing and Configuring ImageMagick on Xampp

#Steps to Install

  1. Download and Install ImageMagick http://imagemagick.org/script/binary-releases.php#windows
  2. Visit ImageMagic installation directory and module/coders copy all files and past on D:\xampp\apache\bin
  3. Download Binary https://pecl.php.net/package/imagick/3.4.0RC5/windows php 5.6 TS one according to phpinfo Architecture if it is x86/x64
  4. Exatract and copy php_imagick.dll to D:\xampp\php\ext
  5. Add php_imagick.dll on php.ini
  6. Copy 8 CORE_*.dll to D:\xampp\apache\bin
  7. Restart Apache
  8. done and visit phpinfo
@tojibon
tojibon / Artisan.md
Last active January 10, 2024 08:07
Laravel CheatSheets based from - https://learninglaravel.net/cheatsheet/
// Added in 5.1.11:http://laravel.com/docs/5.1/authorization#creating-policies
php artisan make:policy PostPolicy
// Displays help for a given command
php artisan --help OR -h
// Do not output any message
php artisan --quiet OR -q
// Display this application version
php artisan --version OR -V
// Do not ask any interactive question
@tojibon
tojibon / paper-canvas.vue
Created November 21, 2023 11:24 — forked from RobinMoretti/paper-canvas.vue
Simple PaperJs integration in a vuejs 3 component
<script setup>
import paper from "paper"
import { ref, onMounted } from 'vue'
const canvas = ref(null)
onMounted(()=>{
paper.setup(canvas.value);
var path = new paper.Path();
path.strokeColor = 'black';
@tojibon
tojibon / app.js
Created September 11, 2015 12:27
Using DynamoDB with Node.js, Express.js
var aws_router = require('./routes/aws');
app.use('/aws', aws_router);
//npm install aws-sdk
//visit http://localhost:3000/aws/table-list
@tojibon
tojibon / mac-setup-redis.md
Created January 27, 2022 10:49 — forked from tomysmile/mac-setup-redis.md
Brew install Redis on Mac

type below:

brew update
brew install redis

To have launchd start redis now and restart at login:

brew services start redis
@tojibon
tojibon / AppServiceProvider.php
Created December 13, 2021 09:34 — forked from simonhamp/AppServiceProvider.php
A pageable Collection implementation for Laravel
<?php
namespace App\Providers;
use Illuminate\Support\Collection;
use Illuminate\Pagination\LengthAwarePaginator;
class AppServiceProvider extends ServiceProvider
{
public function boot()
@tojibon
tojibon / Application.js
Created September 29, 2016 12:21
Summernote image upload and save on server instead of base64 data saving on Database.
Application.prototype.initSummerNoteJS = function() {
var $this = this;
$('#description').summernote({
height: 300, //set editable area's height
onImageUpload: function(files, editor, $editable) {
$this.sendFile(files[0],editor,$editable);
}
});
}
@tojibon
tojibon / IndexController.php
Last active February 18, 2021 21:01
Curl get request in Laravel controller with cache support.
<?php
namespace App\Http\Controllers;
class InfoController extends Controller
{
/*
*
* Checking if cache file exist
* @ param string $name cache file name
@tojibon
tojibon / install.md
Created December 15, 2016 11:21
Installing Spring STS or Eclipse IDE on Linux Mint 18 "Sarah"
  1. Download https://spring.io/tools latests
  2. Rename the extracted bundle as "springsource"
  3. sudo mv springsource /opt
  4. sudo chown -R root:root /opt/springsource
  5. sudo chmod -R +r /opt/springsource
  6. sudo cp /opt/springsource/sts-3.8.2.RELEASE/icon.xpm /usr/share/pixmaps/sts.xpm [Your version can be different]
  7. sudo touch /usr/share/applications/sts.desktop<<EOF [Desktop Entry] Encoding=UTF-8 Name=Spring IDE
@tojibon
tojibon / GmailController.js
Last active January 13, 2021 17:34
OAuth2 google authentication and saving information on MongoDB database and later use the token / refreshtoken to retrieve profile information.
/**
* Admin/GmailController
*
* @description :: Server-side logic for managing admin/gmails
* @help :: See http://sailsjs.org/#!/documentation/concepts/Controllers
Help Links:
https://github.com/mscdex/node-imap
https://github.com/pipedrive/inbox
https://github.com/google/google-api-nodejs-client