Skip to content

Instantly share code, notes, and snippets.

Aaron Bushnell aaronbushnell

Block or report user

Report or block aaronbushnell

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@aaronbushnell
aaronbushnell / LocalValetDriver.php
Created Nov 29, 2018
Valet Driver when Craft is in the public root
View LocalValetDriver.php
<?php
class LocalValetDriver extends ValetDriver
{
/**
* Determine if the driver serves the request.
*
* @param string $sitePath
* @param string $siteName
* @param string $uri
View User Settings.json
{
"window.zoomLevel": 0,
"editor.wordWrap": "on",
"editor.tabSize": 2,
"workbench.startupEditor": "newUntitledFile",
"editor.lineHeight": 21,
"git.countBadge": "off",
"workbench.statusBar.feedback.visible": false,
"editor.foldingStrategy": "indentation",
"files.insertFinalNewline": true,
View gist:46f4aae31a260ec9dc668aec5b12e080
<section class="verticalSpacing verticalSpacing--2x">
<form class="searchBar">
<input type="search" class="searchBar__field">
</form>
</section>
@aaronbushnell
aaronbushnell / config.cson
Created Jun 29, 2016
Change code folding per syntax
View config.cson
"*":
core:
audioBeep: false
closeEmptyWindows: false
disabledPackages: [
"terminal-plus"
"vim-mode"
"linter-stylelint"
"file-icons"
]
View styles.less
/*
* Your Stylesheet
*
* This stylesheet is loaded when Atom starts up and is reloaded automatically
* when it is changed and saved.
*
* Add your own CSS or Less to fully customize Atom.
* If you are unfamiliar with Less, you can read more about it here:
* http://lesscss.org
*/
@aaronbushnell
aaronbushnell / accordion.delegate-lib.js
Created Mar 1, 2016
An example of an accordion module using vanilla JS vs jQuery
View accordion.delegate-lib.js
// Using an event delegation library
// app.js = 3.4 KB
const delegate = require('delegate-events');
class Accordion {
constructor () {
this.$accordions = document.querySelectorAll('[data-accordion]');
this.events();
@aaronbushnell
aaronbushnell / _layout.twig
Last active Feb 19, 2016
To use nested extends or not?
View _layout.twig
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{{title}}</title>
</head>
<body>
{% block content %}{% endblock %}
</body>
</html>
@aaronbushnell
aaronbushnell / .zshrc
Last active Oct 28, 2015
A quick build function to run in the command line!
View .zshrc
# Build commands
function b {
if [ -z "$1" ] || [[ $1 =~ "--" ]]; then
gulp build && git add -A && git commit
if [[ $* =~ "--pull" ]]
then
git pull
fi
@aaronbushnell
aaronbushnell / todo.sh
Created Jul 8, 2015
Create Things.app tasks through the command line
View todo.sh
# Follow the todo creation syntax found on Cultured Code's support page (http://support.culturedcode.com/customer/portal/articles/1625470)
# Ex: $ todo "My brand new todo #Tag1 #Tag2 [Project/Area Name] ::An example note >duedate"
function todo {
RESTORE='\033[0m'
RED='\033[00;31m'
GREEN='\033[00;32m'
if [ $# -eq 0 ]
then
echo "${RED}Uh oh! Your todo cannot be empty.${RESTORE}"
@aaronbushnell
aaronbushnell / accordions.html
Created Jul 7, 2015
A simple React demo using accordions
View accordions.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<script src="bower_components/react/react.min.js"></script>
<script src="bower_components/react/JSXTransformer.js"></script>
<style>
.accordion-group__accordion .opened + div {
display: block;
You can’t perform that action at this time.