One Paragraph of project description goes here
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.
| #!/bin/sh | |
| current=$(pwd) | |
| formatter_file=".formatter.exs" | |
| echo $current | |
| if [ -e $current/"$formatter_file" ]; | |
| then | |
| mix format | |
| echo "Formatting Complete" |
| <x-layout> | |
| <x-section> | |
| <x-tabs active="First"> | |
| <x-tab name="First"> | |
| First content goes here. | |
| </x-tab> | |
| <x-tab name="Second"> | |
| Second content goes here. | |
| </x-tab> |
| // router/index.js | |
| import Vue from 'vue' | |
| import VueRouter from 'vue-router' | |
| import routes from './routes' | |
| import middlewarePipeline from './middleware-pipeline' | |
| Vue.use(VueRouter) |
| defmodule Solution do | |
| #Enter your code here. Read input from STDIN. Print output to STDOUT | |
| end | |
| array_length = IO.read(:stdio, :line) | |
| array = IO.read(:stdio, :line) | |
| array_length | |
| |> String.trim | |
| |> String.to_integer |
| # Configures Elixir's Logger to log to file | |
| # ensure https://github.com/onkel-dirtus/logger_file_backend | |
| # is installed in deps of the project in mix.exs | |
| # reuses the original phoenix logging format. | |
| config :logger, backends: [{LoggerFileBackend, :request_log}], | |
| format: "$time $metadata[$level] $message\n", | |
| metadata: [:request_id] | |
| # Keep a seperate log file for each env. | |
| # logs are stored in the root directory of the application |
| /* | |
| * Handling Errors using async/await | |
| * Has to be used inside an async function | |
| */ | |
| try { | |
| const response = await axios.get('https://your.site/api/v1/bla/ble/bli'); | |
| // Success 🎉 | |
| console.log(response); | |
| } catch (error) { | |
| // Error 😨 |
| <?php | |
| #API access key from Google API's Console | |
| define( 'API_ACCESS_KEY', 'YOUR-SERVER-API-ACCESS-KEY-GOES-HERE' ); | |
| $registrationIds = $_GET['id']; | |
| #prep the bundle | |
| $msg = array | |
| ( | |
| 'body' => 'Body Of Notification', |
| /* | |
| * Original script by: Shafiul Azam | |
| * Version 4.0 | |
| * Modified by: Luigi Balzano | |
| * Description: | |
| * Inserts Countries and/or States as Dropdown List | |
| * How to Use: | |
| In Head section: |
| Quick tip for handling CSRF Token Expiration - common issue is when you use csrf protection is that if | |
| a form sits there for a while (like a login form, but any the same) the csrf token in the form will | |
| expire & throw a strange error. | |
| Handling it is simple, and is a good lesson for dealing with other types of errors in a custom manner. | |
| In Middleware you will see a file VerifyCsrfToken.php and be tempted to handle things there. DON'T! | |
| Instead, look at your app/Exceptions/Handler.php, at the render($request, Exception $e) function. | |
| All of your exceptions go through here, unless you have excluded them in the $dontReport array at the |