Skip to content

Instantly share code, notes, and snippets.

View silentworks's full-sized avatar

Andrew Smith silentworks

View GitHub Profile
@silentworks
silentworks / boxfile.yml
Created December 28, 2016 09:13 — forked from tylerflint/boxfile.yml
Hugo with nanobox
run.config:
engine: static
cache_dirs:
- .bin
extra_path_dirs:
- /app/.bin
extra_steps:
.DS_Store
node_modules
@silentworks
silentworks / editor.css
Created October 27, 2016 09:23 — forked from Hendrixer/editor.css
VS code custom CSS for theme
.composite-title, .composite-title, .vs-dark .monaco-workbench>.activitybar>.content {
background-color: rgba(40, 44, 52, 1) !important;
}
.tabs-container, .tab, .tab.active, .title-actions, .tablist, .tabs-container, .tabs, .composite.title {
background-color: rgba(40, 44, 52, 1) !important;
}
.tab.active, .tab {
border-right: 0px !important;
@silentworks
silentworks / mac.md
Created September 21, 2016 14:52 — forked from lornajane/mac.md
Keyboard Only OS X

Keyboard-only Mac Cheatsheet

Hi, I'm Lorna and I don't use a mouse. I have had RSI issues since a bad workstation setup at work in 2006. I've tried a number of extra hardware modifications but what works best for me is to use the keyboard and only the keyboard, so I'm in a good position and never reaching for anything else (except my coffee cup!). I rather unwisely took a job which required me to use a mac (I've been a linux user until now and also had the ability to choose my tools carefully) so here is my cheatsheet of the apps, tricks and keyboard shortcuts I'm using, mostly for my own reference. Since keyboard-only use is also great for productivity, you may also find some of these ideas useful, in which case at least something good has come of this :)

Apps List

There's more detail on a few of these apps but here is a quick overview of the tools I've installed and found helpful

Tool Link Comments
<template>
<div id="app">
<img class="logo" src="./assets/logo.png">
<Hello></Hello>
<Messages></Messages>
</div>
</template>
<script>
import Hello from './components/Hello'
@silentworks
silentworks / README.md
Created April 2, 2016 15:50 — forked from pablobm/README.md
A clear convention for a CRUD with standard Ember + Ember Data

CRUD with Ember (+ Data)

Ember's official documentation describes a number of low-level APIs, but doesn't offer advice on how to put them together. As a result, a simple task such as creating a simple CRUD application is not obvious to a newcomer.

To help solving this problem, I decided to figure out and document a clear convention for simple CRUD apps, using Ember and Ember Data with no third-party add-ons.

@silentworks
silentworks / Explain.md
Last active November 7, 2015 00:13
Route Groups

The above code is broken because each route would return the following:

  • //about
  • //services
  • //contact

All these paths will be absolute url when using pathFor.

If the group was to be changed to be $app->group('', fun...) this would cause an error with FastRoute if the first get route is $app-&gt;get('/', fun...).

<?php
class TestController
{
public function __construct(\Spot\MapperInterface $user, $view)
{
$this->user = $user;
$this->view = $view;
}
<?php
/*
* This file is part of the MODSlim package.
*
* Copyright (c) Jason Coward <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@silentworks
silentworks / _sub_menu.twig
Last active December 24, 2016 19:01
Getting menu to stay active for sub sections
{% macro display_menu_item(item, loop) %}
{% from _self import display_menu_item %}
{% set menuPath = item.link[1:] != '' ? '/' ~ item.link[1:] ~ '/' : 'home' %}
<li class="main-nav-item index-{{ loop.index }}{% if loop.first %} first{% endif %}{% if loop.last %} last{% endif %}{% if item.submenu is defined %} has-dropdown{% endif %}{% if item|current or menuPath in paths.current %} active{% endif %}">
<a href="{{ item.link }}" {% if item.title is defined %}title='{{ item.title|escape }}'{% endif %}
class='{% if item.class is defined %}{{item.class}}{% endif %}'>
{{item.label}}
</a>
{% if item.submenu is defined %}
<ul class="dropdown">