First change permission for sudoers file of the system chmod 666 /etc/sudoers Open sudoers file by chmod 666 /etc/sudoers Then look for root ALL=(ALL) ALL Add your user name to the list by inserting youruser ALL=(ALL) ALL to the file, save and close the file Change permission of sudoers file back to ready only chmod […]

To make it permanent for your user on the server, you would add it to /home/user/.bashrc file. The .bashrc file is sourced when you login, so the parameters will become active when you login. Add the following lines to your .bashrc file. PATH={$PATH}:/{your_app_path} Now when you login, you can simply type foo.sh at your liesure […]

If you dual boot your Windows PC with OS X or Linux, you may have experienced a problem in which your clocks reset themselves incorrectly every time you boot into Windows. Here’s a simple registry edit to fix that. Essentially, the incorrect clock setting happens because OS X and Linux use GMT time while Windows […]

When you execute command generator php artisan generate:controller EventController and this error comes out [InvalidArgumentException] There are no commands defined in the “generate” namespace. Here is the solution: The generate command is from the JeffreyWay/Laravel-4-Generators package, to install it you have to execute composer require way/generators 2.* And then add this line to your app/config/app.php […]

The reason for this error is about updating setting for app/config/mail.php in order to suite SMTP information in your Mail::send() implementation. Change the mail settings according to the following: ‘host’ => ‘smtp.gmail.com’, ‘port’ => 465, ‘encryption’ => ‘ssl’, ‘username’ => ‘your_username’, ‘password’ => ‘your_password’, Then your code should be as simple as: public function email() […]

Windows Ctrl + Alt + Up Column selection up Ctrl + Alt + Down Column selection down Linux Alt + ⇧ + Up Column selection up Alt + ⇧ + Down Column selection down Navigation/Goto Anywhere Ctrl + P Quick-open files by name Ctrl + R Goto symbol Ctrl + ; Goto word in current […]

Suppose you a domain, http://domain.com. Here’s an example of the structure you might be using: domain.com/ (the root of your web hosting) –>yourlaravel4_base/ –>[some other folders…] –>public_html/ (where your html files and such go) –>[some other folders…] –>yourlaravel4/ /public_html/ is the root of the publicly accesible part of your web hosting files. You wanna make […]

In order to change default keymap to Eclipse keymap, select Preferences > Key Bindings – User. This will automatically open keymap setting file for you. Then paste the content of the following file to opened file:

Full and great cheat-sheet site for Laravel: click here , in case you lost your internet connection, here is PDF copy php artisan key:generate : generate encryption key for application php artisan migrate:install : Create the migration repository php artisan migrate:make name : Create a new migration file php artisan generate:migration –fields=”name:string, description:text, started_at:timestamp, ended_at:timestamp” […]

In Windows: Install Composer from this link. In this step, the installer will ask you the directory of php.exe, you should put C:\xampp\php\php.exe if you use XAMPP OR put c:\wamp\bin\php\php5\php.exe Clone by enter git clone https://github.com/laravel/laravel.git in Git Bash terminal or download Laravel. Make sure enable openssl from all php.ini files. If you used WAMPP, […]

express project_name : create a projects npm install module_name: install a module cd project_dir && npm install : install modules which declare in package.json npm prune : auto remove all of modules which not listed in package.json npm update update all module version which is list in package.json npm init create a module

In order check the Internet connection in Android java code: public boolean checkConnectivity() { boolean enabled = false; ConnectivityManager connectivityManager = (ConnectivityManager) this .getSystemService(Context.CONNECTIVITY_SERVICE); NetworkInfo networkInfo = connectivityManager.getActiveNetworkInfo(); NetworkInfo wifiConn = connectivityManager .getNetworkInfo(ConnectivityManager.TYPE_WIFI); NetworkInfo mobileConn = connectivityManager .getNetworkInfo(ConnectivityManager.TYPE_MOBILE); try { if ((wifiConn.getState() == NetworkInfo.State.CONNECTED) || ((mobileConn != null && (mobileConn.getState() == NetworkInfo.State.CONNECTED)))) { enabled = […]

This function will parsing JSON feeds in Android java: public JSONArray parsingDatawithURL (String url) { try { HttpClient httpclient = new DefaultHttpClient(); HttpResponse response = httpclient.execute(new HttpGet(url)); StatusLine statusLine = response.getStatusLine(); if (statusLine.getStatusCode() == HttpStatus.SC_OK) { InputStream inputStream = null; String json = null; // get entity from response HttpEntity entity = response.getEntity(); // get […]

To download a Youtube video or playlist, you need to use a Linux distribution and install the application called youtube-dl Install Youtube-dl application Install this application in Ubuntu-liked Linux distributions is very simple, just run the Linux command : sudo apt-get install youtube-dl However you might run into this following error when you try to […]

Transmission Control Protocol (also known as TCP) is a core protocol of the Internet Protocol Suite. It operates at a higher level than its compatriot, Internet Protocol (also known as IP). The two main concerns of TCP are the two end systems –a web browser and a web server, for example. TCP provides the delivery […]

Referenced from seguetechnologies.com ASP.NET : The Microsoft .NET Framework is a software framework for developing and executing applications on Windows client and server operating systems. It provides features and functionality that are designed specifically for creating and running applications on the Windows platform, but also supports connectivity with non-Windows systems. The Microsoft .NET Platform consists […]