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 / readme.md
Last active November 21, 2018 18:42
CakePHP 3.x and Croogo 3.x Creating a Custom Plugin

Creating Plugins For Croogo

sudo bin/cake bake plugin Apps

You will be asked to choose a location of the plugin. Select outermost Plugin/ folder.
Creates proper directory structure for new plugin
Adds entry in config/bootstrap.php file to load newly created plugin It is recommended that you delete entry of newly baked plugin from config/bootstrap.php file as you will be able to enable-disable plugin from UI. The line will look something like:

@tojibon
tojibon / install.md
Created January 7, 2018 19:21
Install WordPress via WP-CLI
# Download and Configure WordPress   
wp core download   
wp core config --dbhost=host.db --dbname=prefix_db --dbuser=username --dbpass=password   

# Configure wp-config.php   
chmod 644 wp-config.php   
wp core install --url=yourwebsite.com --title="Your Blog Title" --admin_name=wordpress_admin --admin_password=4Long&Strong1 --admin_email=you@example.com   

# Enable File Uploading 
@tojibon
tojibon / install.md
Last active March 20, 2019 10:19
Some common installation task for Linux after installing OS
sudo apt-get install -y build-essential
sudo apt-get install curl -y
sudo apt-get install libpng-dev libjpeg-dev -y
sudo apt-get install pngquant -y
sudo apt-get install git -y
sudo apt-get install openssh-server -y
sudo apt-get install unrar -y
# Fix local issue: https://askubuntu.com/questions/162391/how-do-i-fix-my-locale-issue
@tojibon
tojibon / install.md
Last active May 9, 2019 22:08
Installing Croogo 3.0.0-alpha.3 with CakePHP 3.x
composer create-project croogo/app croogoapp 3.0.x-dev 
cd croogoapp
bin/cake Croogo/Install.install admin admin
bin/cake server

sudo chmod -R 0777 ./tmp/cache/queries/
sudo chmod -R 0777 ./tmp/cache/persistent/
@bradj
bradj / node-aws-dynamodb
Created December 19, 2012 07:41
Node.js AWS DynamoDB scan example
var express = require('express');
var aws = require('aws-sdk');
var config = require('./config.js');
aws.config.update({accessKeyId: config.key, secretAccessKey: config.secret});
aws.config.update({region: 'us-east-1'});
var app = express();
app.configure(function(){
@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
@navinpai
navinpai / remove_9gag_watermark.php
Created May 20, 2012 17:11
Remove watermark/link from 9GAG Images
<?php
// Got bored/bugged of seeing the watermarks/Link at the bottom of 9GAG images. So wrote this script to remove them
// Eg. http://d24w6bsrhbeh9d.cloudfront.net/photo/4216213_700b_v1.jpg
// Very very basic PHP, but gets stuff done!
// Coded while listening to: http://8tracks.com/jkurtis/we-ll-run-wild :D
// USAGE: Put all pics in a 'pics' folder and create an empty 'crop' folder. Run Script. Enjoy. :D
$count=0;
echo "<h6>STARTED</h6>";
foreach(glob('pics/{*.jpg,*.jpeg,*.png}', GLOB_BRACE) as $image)
{
@butlerblog
butlerblog / auto-login-from-reg-email.php
Last active November 5, 2021 15:44
WordPress auto login from native registration email
<?php
/*
This code snippet can be added to your functions.php file (without the <?php)
to add a query string to the login link emailed to the user upon registration
which when clicked will validate the user, log them in, and direct them to
the home page.
*/
/**
* This first function is hooked to the 'user_register' action which fires
@JeffreyWay
JeffreyWay / .bash_profile
Created May 8, 2013 18:02
Laravel aliases
# laravel new-app
alias laravel="git clone -o laravel -b develop https://github.com/laravel/laravel.git"
alias artisan="php artisan"
alias migrate="php artisan migrate"
alias serve="php artisan serve"
alias dump="php artisan dump"
alias t="phpunit"
# Generators Package
@mikermcneil
mikermcneil / using-raw-socket-io-in-sails.js
Created September 17, 2013 18:32
Using raw socket.io functionality in a Sails.js controller
module.exports = {
/**
*
* Using raw socket.io functionality from a Sails.js controller
*
*/
index: function (req,res) {