Skip to content

Instantly share code, notes, and snippets.

View iWader's full-sized avatar

Wade Urry iWader

View GitHub Profile
@iWader
iWader / composer.sh
Last active July 23, 2024 07:47
Laravel Unit and Dusk tests on CircleCI 2.0 https://iwader.co.uk/post/laravel-unit-dusk-tests-circleci
#!/bin/sh
EXPECTED_SIGNATURE=$(wget -q -O - https://composer.github.io/installer.sig)
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"
ACTUAL_SIGNATURE=$(php -r "echo hash_file('SHA384', 'composer-setup.php');")
if [ "$EXPECTED_SIGNATURE" != "$ACTUAL_SIGNATURE" ]
then
>&2 echo 'ERROR: Invalid installer signature'
rm composer-setup.php

Keybase proof

I hereby claim:

  • I am iwader on github.
  • I am iwader (https://keybase.io/iwader) on keybase.
  • I have a public key ASAbhTskQcNMKWKTeliaGL89p-T0IcR6CL-SeG57jSPYggo

To claim this, I am signing this object:

@iWader
iWader / Markup.html
Last active August 29, 2015 14:06
Bootstrap Radio Button Replacement
<div class="btn-toolbar form-replacement" data-toggle-name="field_name">
<button type="button" value="true" class="btn btn-default">Yes</button>
<button type="button" value="false" class="btn btn-default">No</button>
</div>
<input name="field_name" type="hidden">
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
less: {
dist: {
files: {
'public/assets/css/app.min.css': [
'public/assets/less/app.less'
<?php
/* Redacted */
/*
|--------------------------------------------------------------------------
| Register The Auto Loader
|--------------------------------------------------------------------------
|
| Composer provides a convenient, automatically generated class loader
| for our application. We just need to utilize it! We'll require it
@iWader
iWader / ajax_dyn_key
Last active December 29, 2015 09:28
Sending ajax with dynamic key name
$(document).ready(function() {
function ajax_save(field, value)
{
$.ajax({
type: 'POST',
url: '{{ URL::to('/test') }}',
data: field + '=' + value
}).done(function(data) {
console.log('Response: ' + data);
}).fail(function(data) {