Skip to content

Instantly share code, notes, and snippets.

@vlio20
vlio20 / terminal-help-commands.sh
Last active September 23, 2015 19:03
Useful commands
#who using port
lsof -i tcp:3000
@vlio20
vlio20 / toolbar-scroll-shadow.js
Last active September 25, 2015 12:10
angular directive for toolbar scrolling shadow effect
'use strict';
(function (angular) {
angular.module('directives')
.directive('toolbarScrollShadow', Directive);
/** @ngInject */
function Directive() {
var directive = {
restrict: 'A',
git commit -m "your comment"
git subtree push --prefix dist origin gh-pages
svn st | grep '^?' | awk '{print $2}' | xargs rm -rf
Edited last year by Lewis
PHPStorm debugging is amazing
I recently installed Homestead for my development environment and discovered Xdebug needed some additional settings before it would work. Here's a step-by-step process that I used to get PHPStorm + Homestead + Xdebug working in harmony.
I'm going to assume you have installed PHPStorm and Homestead.
Configure Xdebug
Navigate to Tools>Vagrat>Up
Navigate to Tools>Start SSH Session and choose your vagrant host (PHPStorm automatically adds this)
@vlio20
vlio20 / README.md
Created March 22, 2016 05:22 — forked from johnlindquist/README.md
Angular 2 Time Machine Subjects

Angular 2 Time Machine

@ngrx/store example

Demonstrates the basics of @ngrx/store.

@vlio20
vlio20 / index.html
Created April 1, 2016 09:48 — forked from johnlindquist/index.html
Dynamically Add a Component
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>RxJSCraft</title>
<script src="https://npmcdn.com/angular2/bundles/angular2-polyfills.js"></script>
<script src="https://npmcdn.com/systemjs@0.19.24/dist/system.js"></script>
<script src="https://npmcdn.com/typescript@1.8.9/lib/typescript.js"></script>
</head>
<body>
# Refactoring Directives to 1.5 Components
Below you will find guide on how to refactor your directives to components:
**Step 1 - Rename your files suffix:**
Components should have the suffix `.component.ts` while directives have the `.dir.ts suffix`.
`<file_name>.drv.ts` ==> `<file_name>.component.ts`
Note: all related files should be renamed as well (jade, less, spec etc.).
**Step 2 - Change the module initialization:**
In the relevant module change the initialization from directive to component.
@vlio20
vlio20 / refactor-extention.sh
Last active October 26, 2016 20:58
rename extension
for f in $(find `pwd` -name "*.js"); do
cp "$f" "${f%.js}.ts"
done
@vlio20
vlio20 / package.json
Created June 23, 2017 18:30
webpack + typescript + react
{
"name": "Oogaday",
"version": "0.0.0",
"main": "index.js",
"author": "Vlad Ioffe",
"license": "MIT",
"scripts": {
"serve": "webpack-dev-server --config=webpack.dev.config.js"
},
"devDependencies": {