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 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/
@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
Created March 14, 2017 08:05
Upgrade Node.js via NPM
sudo npm cache clean -f   
sudo npm install -g n   
sudo n stable   
sudo n 0.8.21   
node -v   
@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 / readme.md
Last active April 16, 2017 20:23
CakePHP 3.x and Croogo 3.x Localhost Setup to fix Croogo default css / htaccess issue on Ubuntu

/etc/apache2/sites-enabled/
sudo cp 000-default.conf croogo-app.conf
sudo vim croogo-app.conf

<VirtualHost *:80>
       ServerName local.croogo-app.com
       ServerAlias local.croogo-app.com

       ServerAdmin webmaster@localhost
 DocumentRoot /var/www/html/croogo/base-app/
@tojibon
tojibon / .htaccess
Created March 2, 2017 07:16
WordPress security & Browser caching
# Disable directory browsing
Options All -Indexes
# Disable access to all file types except the following
Order deny,allow
Deny from all
<Files ~ ".(xml|css|js|jpe?g|png|gif|pdf|docx|rtf|odf|zip|rar)$">
Allow from all
</Files>
@tojibon
tojibon / terminal.md
Created February 23, 2017 05:41
Terminal Shortcut :D
  1. Clean up the line: You can use Ctrl+U to clear up to the beginning.
  2. Clean up the line: Ctrl+A Ctrl+K to wipe the current line in the terminal
  3. Cancel the current command/line: Ctrl+C.
  4. Recall the deleted command: Ctrl+Y (then Alt+Y)
  5. Go at the beginning of the line: Ctrl+A
  6. Go at the end of the line: Ctrl+E
  7. Remove the forward words for example, if you are middle of the command: Ctrl+K
  8. Remove characters on the left, until the beginning of the word: Ctrl+W
  9. To clear your entire command prompt: Ctrl + L
  10. Toggle between the start of line and current cursor position: Ctrl + XX
@tojibon
tojibon / linux.bat
Created January 24, 2017 12:27
Hiding PHP Version Number in HTTP Header
$ php -i | grep "Loaded Configuration File" #Loaded Configuration File => /etc/php/7.0/cli/php.ini
$ sudo vi /etc/php/7.0/cli/php.ini
expose_php = off
$ sudo service httpd restart
$ sudo service apache2 restart
@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 / readme.md
Created November 25, 2016 10:38
Download Audio Transcriptions from YouTube

Here’s a quick guide on how to transcribe audio or video files to text with the help of YouTube.

  1. Go to youtube.com/upload and upload your video file. If you have an MP3 audio file, you may use a tool like Windows Movie Maker, iMovie on Mac or FFMpeg to convert the audio into a video file before uploading to YouTube.
  2. Wait for YouTube to completely process the video. The machine transcriptions may not immediately become available after uploading the video.
  3. Open the YouTube video page in Chrome and look for the CC button in the player. If it exists, the transcribed audio can be downloaded as text.
  4. Press F12 on Windows, or Option+Cmd+J on Mac, to open the JavaScript console inside Chrome Developer tools and paste this code:
if(yt.config_.TTS_URL.length) window.location.href=yt.config_.TTS_URL+"&kind=asr&fmt=srv1&lang=en"