Skip to content

Instantly share code, notes, and snippets.

@d-simon
d-simon / composer.json
Created August 12, 2020 12:23
Deployer
{
"name": "organization/project",
"description": "Project",
"require": {
},
"scripts": {
"deploy": [
"@php vendor/bin/dep deploy"
]
},
@d-simon
d-simon / application.js
Last active May 30, 2019 20:44
Rails 6.0.0.rc1 fresh install throws the webpack error as described in https://github.com/rails/webpacker/issues/2109
// This file is automatically compiled by Webpack, along with any other files
// present in this directory. You're encouraged to place your actual application logic in
// a relevant structure within app/javascript and only use these pack files to reference
// that code so it'll be compiled.
require("@rails/ujs").start()
require("turbolinks").start()
require("@rails/activestorage").start()
require("channels")
@d-simon
d-simon / keybase.md
Created October 8, 2016 17:28
keybase.md

Keybase proof

I hereby claim:

  • I am d-simon on github.
  • I am davidsimon (https://keybase.io/davidsimon) on keybase.
  • I have a public key whose fingerprint is EB64 3686 E156 999C C195 2F1B C6FE 5E4E 6675 123F

To claim this, I am signing this object:

@d-simon
d-simon / osx-for-hackers.sh
Last active December 22, 2016 03:05 — forked from brandonb927/osx-for-hackers.sh
OSX for Hackers: Yosemite Edition. This script tries not to be *too* opinionated and any major changes to your system require a prompt. You've been warned. Also, please don't email me about this script, my poor inbox...
#!/bin/sh
# Alot of these configs have been taken from the various places
# on the web, most from here
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
# Set the colours you can use
black='\033[0;30m'
white='\033[0;37m'
red='\033[0;31m'

#Commit Message Guidelines (Shortened) This is a revamped proposal for structuring commit messages. It is a set of guidelines evolved from a need to scan, review and navigate commits quickly. They are ment to bring clarity to the commit history while retaining a lot of flexibility.

#Structure

[Action] Scope: Summary

Detailed Body Text (if necessary)
@d-simon
d-simon / jquery.dispatcher.js
Created March 13, 2015 00:50
jQuery Mediator / Event Dispatcher
(function($) {
'use strict';
var $document = $(document.documentElement);
// Create the dispatcher
$.dispatcher = $.dispatcher || {};
var dispatcherMethods = {
trigger: function (event, data, elem) {
// If element is provided trigger from element
@d-simon
d-simon / .editorconfig
Created August 4, 2014 19:14
EditorConfig
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 4
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
@d-simon
d-simon / Commit_Guidelines.md
Last active January 31, 2021 10:43
Commit Guidelines

Commit Message Guidelines

This is a proposal for structuring commit messages. It is a set of guidelines evolved from a need to scan, review and navigate commits quickly. They are ment to bring clarity to the commit history while retaining a lot of flexibility.

Structure

[Action] Scope: Summary

(Involved Commits)
@d-simon
d-simon / query_string_parameter.js
Created April 27, 2014 09:40
Query String Parameters
// http://stackoverflow.com/a/901144
function getParameterByName(name) {
name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
results = regex.exec(location.search);
return results === null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
ALTER TABLE users
ADD COLUMN `count` SMALLINT(6) NOT NULL AFTER `lastname`,
ADD COLUMN `log` VARCHAR(12) NOT NULL AFTER `count`,
ADD COLUMN `status` INT(10) UNSIGNED NOT NULL AFTER `log`;