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 / remove.bat
Created September 10, 2015 10:14
Removing everything from a directory which has a lot of long named files and directory in Windows Command Prompt
mkdir tpm_empty_dir
robocopy tpm_empty_dir the_dir_to_make_empty /s /mir
rmdir tpm_empty_dir
@tojibon
tojibon / get_location_info_by_google_map.php
Created September 10, 2015 10:51
Get location info by google latitude and longitude via Google Map API and CURL
<?php
/*
Get location info by google latitude and longitude via Google Map API and CURL
You may need to change the proxy ip:port and auth username:pass or keep them empty.
*/
/*
*
* @ param string $url as 'http://maps.google.com'; Page url location which you want to fetch
* @ param string $proxy [optional] as '[proxy IP]:[port]'; Proxy address and port number
@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 / gruntfile.js
Created September 12, 2015 19:18
Grunt CSS Minify Example
module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
cssmin: {
my_target: {
files: [{
expand: true,
cwd: 'css/',
src: ['*.css', '!*.min.css'],
@tojibon
tojibon / gruntfile.js
Last active September 12, 2015 19:41
Grunt JS Minify Example
module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
uglify: {
options: {
manage: false
},
my_target: {
files: [{
@tojibon
tojibon / gruntfile.js
Created September 12, 2015 20:21
Concating multiple JS file into a single JS file via Grunt Optional others
module.exports = function(grunt){
grunt.initConfig({
pkg: grunt.file.readJSON('package.json'),
concat: {
options: {
seperator: ";",
stripBanners: true,
banner: '/*! <%= pkg.name %> - v<%= pkg.version %> - ' + '<%= grunt.template.today("yyyy-mm-dd") %> */ \n',
},
@tojibon
tojibon / .bowerrc
Created October 3, 2015 14:09
Adding Bower Components / Bootstrap on SailsJS Application
{
"directory": "assets/vendor"
}
@tojibon
tojibon / cakephp-croogo.bat
Last active November 15, 2015 17:05
Installing CakePHP 2.7.6 with Croogo 2.2.x
composer create-project croogo/app app-name
cd app-name
composer install
brackets . //opening project with brackets editor
//edit (replace notEmpty with notBlank):
// Vendor/croogo/croogo/Users/Model/Role.php
// Vendor/croogo/croogo/Users/Model/RolesUser.php
// Vendor/croogo/croogo/Users/Model/User.php
//create database with phpmyadmin
//browser http://your-domain.com/
@tojibon
tojibon / vagrant.bat
Created October 8, 2015 05:05
Creating Virtual Machines using Vagrant
visit and install: https://www.vagrantup.com/
visit and install: https://www.virtualbox.org/
CMD:
vagrant -v
mkdir vagrant-centos
cd vagrant-centos
vagrant init osname [image-link from http://www.vagrantbox.es/]
ls
vim Vagrantfile
:wq! [Save and come out]
@tojibon
tojibon / Vagrantfile
Last active October 8, 2015 09:36
Sailsjs ready Vagrant setup
# -*- mode: ruby -*-
# vi: set ft=ruby :
# All Vagrant configuration is done below. The "2" in Vagrant.configure
# configures the configuration version (we support older styles for
# backwards compatibility). Please don't change it unless you know what
# you're doing.
Vagrant.configure(2) do |config|
# The most common configuration options are documented and commented below.
# For a complete reference, please see the online documentation at