Skip to content

Instantly share code, notes, and snippets.

View smamran's full-sized avatar
🎯
Focusing

S. M. AMRAN smamran

🎯
Focusing
View GitHub Profile
@smamran
smamran / ubuntu commands.md
Last active October 24, 2016 13:55
ubuntu commands

Display Total Disk Size

$$ fdisk -l | grep Disk

Displays Size of Folder sorted according to size

$$ sudo du -sh .[!.]* *| sort -nr   (Including Subdirectories)
$$ sudo du -sh * | sort -nr         (Excluding Subdirectories)
@smamran
smamran / Visual Studio 2015 Config.md
Last active June 5, 2016 12:13
Visual Studio 2015

Disable Pragma Warning

>> #pragma warning(disable : 4996)
@smamran
smamran / GNU C.md
Created December 28, 2015 07:49
GNU C

Check whether a directory exists

#include <sys/stat.h>
struct stat st;
if(stat("/tmp",&st) == 0)
        printf(" /tmp is present\n");
@smamran
smamran / httpd.md
Created December 20, 2015 13:07
httpd

If you are using XAMPP then open C:\xampp\apache\conf\httpd.conf in your favorite php editor.

OR

If you are using WAMP then open C:\wamp\bin\apache\Apache2.2.11\conf\httpd.conf in your favorite php editor. We need to shift "C:\xampp\htdocs" to "D:\projects" so that when we open "http://localhost", then instead of listing projects in "htdocs" folder it will list our projects from "D:\projects" .

@smamran
smamran / httpd.conf original
Created December 20, 2015 10:51
httpd.conf
#
# This is the main Apache HTTP server configuration file. It contains the
# configuration directives that give the server its instructions.
# See <URL:http://httpd.apache.org/docs/2.4/> for detailed information.
# In particular, see
# <URL:http://httpd.apache.org/docs/2.4/mod/directives.html>
# for a discussion of each configuration directive.
#
# Do NOT simply read the instructions in here without understanding
# what they do. They're here only as hints or reminders. If you are unsure
@smamran
smamran / Java Command.md
Last active November 22, 2016 10:44
Java Command Line

πŸ”« πŸ—‘ Java Command Line βš› πŸ’£

πŸ‰ β˜• πŸ”ͺπŸ”§ Compile Main Class in Different Directory πŸ—‘πŸ”¨ πŸ‰ β˜•

>> javac main\Main.java
>> java main.Main.java

πŸ‰ β˜• πŸ”ͺπŸ”§ Create Jar πŸ—‘πŸ”¨ πŸ‰ β˜•

src &gt;&gt; jar cvfe Main.jar main.Main main\*.class
@smamran
smamran / c9.io apache php mysql latest.md
Last active December 16, 2015 06:39
c9.io apache php mysql

πŸ”« πŸ—‘ apache php mysql latest βš› πŸ’£

πŸ”ͺπŸ”§ Command List πŸ—‘πŸ”¨

>> mysql -u netcse -p (version check mysql)
>> sudo apt-get install mysql-server-5.6 (Install mysql-server-5.6)
>> apachectl -V (check apache version)
>> php -v
@smamran
smamran / NGINX C9.io Compile.md
Created December 15, 2015 02:39
Nginx Ubuntu Compile

πŸ”« πŸ—‘Commands βš› πŸ’£

πŸ”ͺπŸ”§ Download NginX Source & Unzip πŸ—‘πŸ”¨

>> wget http://nginx.org/download/nginx-1.9.9.tar.gz  
>> tar xvfvz nginx-1.9.9.tar.gz
>> cd nginx-1.9.9/

πŸ”ͺπŸ”§ Configure, Compile & Install πŸ—‘πŸ”¨