Skip to content

Instantly share code, notes, and snippets.

View peterbsmyth's full-sized avatar

Peter B Smith peterbsmyth

View GitHub Profile
@peterbsmyth
peterbsmyth / .bashrc
Created February 9, 2019 17:01 — forked from drewknab/.bashrc
.bashrc requires bash > 4.1 [FIXES escape bug]
git=""
function parse_git_branch() {
BRANCH=`git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/\1/'`
if [ ! "${BRANCH}" == "" ]
then
STAT=`parse_git_dirty`
STR=$'\u251c'
STR+=$'\u2574'
STR+="$cyan${BRANCH}${STAT}"
{{ partial "header.html" . }}
{{ partial "navigation.html" . }}
<!-- Header -->
<section>
<h1>Ninja Class</h1>
<p>description.. description.. description.. description.. description..</p>
<p>description.. description.. description.. description.. description..</p>
</section>
@peterbsmyth
peterbsmyth / starter_commands.md
Last active September 18, 2018 22:17
Starter Commands

Getting Started

To get a repository from github

git clone https://github.com/peterbsmith2/syacuse-ninja-barracks

Making a new design

To make a new branch

const { $ } = require('../../helpers/query')
module.exports = class SaveButton {
constructor (store) {
this.$input = $('#btn')
this.store = store
this.actions = {}
this.actionTypes = {}
}
@peterbsmyth
peterbsmyth / webpack.server.config.js
Created May 20, 2018 20:11 — forked from kseniya292/webpack.server.config.js
Angular Universal Webpack Config File
const path = require('path');
const webpack = require('webpack');
module.exports = {
entry: { server: './server.ts' },
resolve: { extensions: ['.ts', '.js'] },
target: 'node',
// this makes sure we include node_modules and other 3rd party libraries
externals: [/(node_modules|main\..*\.js)/],
output: {
@peterbsmyth
peterbsmyth / editable-card-recipe.md
Last active May 1, 2018 08:44
Editable Card Recipe

Editable Card Recipe

Introduction

The follwing example of an editable card has 4 components:

  1. Home Page
  2. Editable Try Card
  3. Try Card Form
  4. Try Card

In context a 'try' standards for 'try this...', with a suggestion for handling a rhetorical situation.

Narrator
War began between
Germany and France on August 3, 1914.
Five weeks later,
the German army had smashed its way...
to within 18 miles of Paris.
There, the battered French miraculously
rallied their forces at the Marne River...
and in a series
of unexpected counterattacks —

Lt. Daniels controls conversation as a boss, utilizing his ethos. McNulty in the beginning makes point about the character of the opponent -- "these guys are good." As well, McNulty concedes very well when he says "okay, I'm an asshole for that."

Lt. Daniels
For now, we'll work out of Narcotics,
with Kima keeping the file.
We'll copy everything to Ronnie
at the courthouse and your people.

Santangelo
Fine with us.

Lt. Daniels

import { Injectable } from '@angular/core';
import { HttpClient } from '@angular/common/http';
import { TransferState, makeStateKey } from '@angular/platform-browser';
import { of } from 'rxjs/observable/of';
import { tap } from 'rxjs/operators';
export const POST_KEY = makeStateKey('posts');
@Injectable()
export class ApiService {