Skip to content

Instantly share code, notes, and snippets.

View silentworks's full-sized avatar

Andrew Smith silentworks

View GitHub Profile
<template>
<div id="app">
<img class="logo" src="./assets/logo.png">
<Hello></Hello>
<Messages></Messages>
</div>
</template>
<script>
import Hello from './components/Hello'
SystemJS.config({
transpiler: "typescript",
typescriptOptions: {
"experimentalDecorators": true,
"emitDecoratorMetadata": true
},
map: {
"rxjs": "https://npmcdn.com/rxjs",
"angular2": "https://npmcdn.com/angular2",
"@ngrx": "https://npmcdn.com/@ngrx",
@pablobm
pablobm / README.md
Last active June 3, 2022 10:07
A clear convention for a CRUD with standard Ember + Ember Data

CRUD with Ember (+ Data)

Compatible with Ember 1.13.0+ Compatible with Ember Data 1.13.0+

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

@nathansmith
nathansmith / [1] flag_linkedin_recruiters.js
Last active January 28, 2016 20:07
This function can be used to pre-check (for removal) all recruiters in your LinkedIn connections list.
/*
This function can be used to pre-check (for removal)
all recruiters in your LinkedIn connections list.
It excludes recruiters that are also colleagues, so
you don't accidentally get any false positivies.
It doesn't actually do any deletion, just makes the
connections list focused solely on recruiters. The
deletion itself is up to you.
@nathansmith
nathansmith / empty_linkedin_inbox.js
Last active January 15, 2016 13:07
JS snippet to empty all messages from LinkedIn's UI.
/*
This function can be used to empty your
LinkedIn inbox. You should first scroll
to the bottom of the list, so that it
lazy-loads all of your messages into
the DOM at once. Then run this…
*/
// Closure.
(function ($) {
@chadrien
chadrien / README.md
Last active April 22, 2025 15:52
Debug PHP in Docker with PHPStorm and Xdebug

Debug your PHP in Docker with Intellij/PHPStorm and Xdebug

  1. For your local dev, create a Dockerfile that is based on your production image and simply install xdebug into it. Exemple:
FROM php:5

RUN yes | pecl install xdebug \
&amp;&amp; echo "zend_extension=$(find /usr/local/lib/php/extensions/ -name xdebug.so)" &gt; /usr/local/etc/php/conf.d/xdebug.ini \
@jeremykendall
jeremykendall / DoctrineConfig.php
Last active August 29, 2015 14:27
Doctrine2 EntityManager via Aura.Di using wrapper and factory
<?php
namespace Namespace\Di;
use Aura\Di\Config;
use Aura\Di\Container;
use Doctrine\Common\Cache\ApcCache;
use Doctrine\Common\Cache\ArrayCache;
use Doctrine\DBAL\Event\Listeners\MysqlSessionInit;
use Doctrine\ORM\Configuration;
@harikt
harikt / Common.php
Created August 17, 2015 06:54
Configuring Doctrine ORM Entity Manager with Aura.Di
<?php
$di->set('entity_manager', function () {
// paths
$paths = array(__DIR__);
$isDevMode = false;
// the connection configuration
$dbParams = array(
'driver' => 'pdo_mysql',
'user' => getenv('username'),
'password' => getenv('password'),
@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">
@ziadoz
ziadoz / quantity.html
Created February 25, 2015 02:16
React JS - Product Quantity Input
<!-- Demo: http://jsfiddle.net/o38gdsfd/6/ -->
<!DOCTYPE HTML>
<html lang="en">
<head>
<title>React JS - Quantity Input</title>
<style>
.component-quantity-input {
display: block;
}