Skip to content

Instantly share code, notes, and snippets.

git add .
git commit -m "Soem message"
git tag -a v1.0.4
git push --follow-tags
This will commit the changes to tav v1.0.4
@extends('quarx::layouts.dashboard', ['pageTitle' => '_camelUpper_casePlural_ » Edit'])
@section('content')
<div class="row">
<div class="col-md-12">
<div class="pull-right raw-margin-top-24 raw-margin-left-24">
{!! Form::open(['route' => 'assessments.search']) !!}
<input class="form-control form-inline pull-right" name="search" placeholder="Search">
{!! Form::close() !!}
@shabaz-ejaz
shabaz-ejaz / Clone specific branch
Created February 6, 2018 16:11
Clone specific branch
git clone -b my-branch [email protected]:user/myproject.git
@shabaz-ejaz
shabaz-ejaz / Array map shorthand
Created January 30, 2018 15:21
Array map shorthand
const arr = [7, 4, 1, 4];
{[...arr].map((x, i) =>
<p>Element</p>
)}
@shabaz-ejaz
shabaz-ejaz / dynamically change fields in redux form.js
Created November 6, 2017 16:15
Dynamically change / add fields in redux form
this.props.dispatch(change('SubmitResultsForm', `paraprotein_questions.${index}.title`, item.title));
@shabaz-ejaz
shabaz-ejaz / nested_map_function.js
Created October 12, 2017 09:20
Nested map function
{item.typing_methods.map((method, methodIndex) => {
return method.unitsOfMeasurement.map((unit, unitIndex) => (
<option value={unit.title}>{unit.title}</option>
));
})}
@shabaz-ejaz
shabaz-ejaz / Immediately invoked function expressions.js
Created September 26, 2017 08:47
Immediately invoked function expressions
{(() => {
switch (this.state.color) {
case "red": return "#FF0000";
case "green": return "#00FF00";
case "blue": return "#0000FF";
default: return "#FFFFFF";
}
})()}
@shabaz-ejaz
shabaz-ejaz / Upgrade PHP CLI version in WAMP
Created September 15, 2017 15:25
Upgrade PHP CLI version in WAMP
- Update to atleast Wampserver 3.0.4
- Add the PHP version you want for the CLI (e.g. 7.0.10)
- Change PHP version from Wamp tray icon
- Verify that all works fine
- Exit Wampserver
- Edit the file wamp/wampmanager.conf to replace phpCliVersion = 5.6.16 with the version number you want to use and save the modified file.
- Launch Wampserver and wait for Green icon then exit
@shabaz-ejaz
shabaz-ejaz / Check if data is array.js
Created September 8, 2017 13:32
Check if data is array
if (data instanceof Array) {
}
@shabaz-ejaz
shabaz-ejaz / Reload page if loader shown for more than 6 seconds
Created September 8, 2017 09:21
Reload page if loader shown for more than 6 seconds
setTimeout(() => ( function(){ if(this.isFetching) window.location.reload(true); console.log("page reloaded due to loading timeout") }), 6000);