Category: Tutorials

Something is already running on port 3000. mac

Something is already running on port 3000. mac

I have a node app that has to run on localhost:3000 but my mac keeps saying that something is running on port 3000. When I run netstat or lsof and check for running programs...

Laravel Ajax Button

Laravel Ajax Button

in blade <button class=”btn-xs btn-info grant_access” data-options='{“user_id”:”{{ $user->id }}”, “action”: “remove”, “role_id” : {{ $role_id }}, “_token”: “{{ Session::token() }}” }’>Has Access<h;/button> <script> $(‘.grant_access’).click(function(){ var options = $(this).data( “options”); var sel = $(this); //console.log(options);...

Limit Server Options Requests

Limit Server Options Requests

in httpd.conf <IfModule hmod_allowmethods> AllowMethods GET POST OPTIONS </IfModule> In each VirtualHost directive ## Disallow OPTIONS METHOD RewriteEngine On RewriteCond %{REQUEST_METHOD} !(GET|POST) RewriteRule .* – [F] This seems to stop the majority of the...

Working and testing redirects for Apache

Working and testing out redirects for Apache To work on a testing local install of the site make sure you have a local installation of the site you are trying to put redirects in...

0

Laravel Save Form Post

php artisan make:migration tasks in database / migrations / create tasks table – paste in up()  function Schema::create(‘tasks’, function (Blueprint $table) { $table->increments(‘id’); $table->string(‘title’); $table->text(‘body’); $table->timestamps(); }); php artisan make:model Task in class Task...

0

Laravel Deployment on Ec2

You gotta have composer installed cd /home/ec2-user/ sudo curl -sS https://getcomposer.org/installer | php // sudo mv composer.phar /usr/local/bin/composer cd /var/www/html/website-directory // make vendor folder sudo mkdir vendor // change permissions sudo chmod -R 755...

0

Get Url In Laravel

There are a bunch of ways to grab the url in Laravel. Here are a few of the ways I have found. Grab whole Url \URL::current(); //returns http://site.localhost/order/202 Grab just the requested URI \Route::current()->uri...

0

PHP Cookie Problems

Cookies have been around forever – they are browser based variables that can be set to expire in the future. The variables are helpful for letting a user bounce around from page to page...

Jekyll Quick start 0

jekyll static site quickstart

This is directly from jekyllrb.com, the main website for jekyll. gem install bundler jekyll jekyll new my-awesome-site cd my-awesome-site bundle exec jekyll serve # => Now browse to http://localhost:4000 Once you’ve installed and started...

0

Should I use Jekyll for a Website?

What is Jekyll The quick answer – a static site generator.  You create templates using Liquid template engine, and content using HTML and Mark Down and the combo comes together and generates a standard...