Skip to content

Instantly share code, notes, and snippets.

Avatar

Wade Urry iWader

View GitHub Profile
View composer.sh
#!/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
View keybase.md

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:

View index.php
<?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 Dec 29, 2015
Sending ajax with dynamic key name
View ajax_dyn_key
$(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) {
@iWader
iWader / Markup.html
Last active Aug 29, 2015
Bootstrap Radio Button Replacement
View Markup.html
<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">
View Gruntfile.js
'use strict';
module.exports = function(grunt) {
grunt.initConfig({
less: {
dist: {
files: {
'public/assets/css/app.min.css': [
'public/assets/less/app.less'