/* | |
Extracts each .spa file in Spotify's Apps directory without manually doing it yourself. | |
The default folder is put on the desktop. | |
To change that, change the following part of the command: | |
`~/Desktop/Apps && cd ~/Desktop/Apps` | |
Procedure: | |
1. Change directory to /Applications/Spotify.app/Contents/Resources/Apps | |
2. Copy the files within the directory to ~/Desktop/Apps and change directory |
/* | |
Repacks the Spotify modules | |
It converts your folder into a .spa file. (e.g., profile -> profile.spa) | |
All module folders will be deleted after running this. | |
As a result, the root directory will only contain .spa files. (ready to be placed into Spotify's contents) | |
To run, simply `cd` into the root Apps folder of your skin. | |
Then, take said folder and replace it with Spotify's Apps directory found at `/Applications/Spotify.app/Contents/Resources/Apps` | |
import expect from 'expect'; | |
import sinon from 'sinon'; | |
import fetch from 'isomorphic-fetch'; | |
describe.only('Sinon samples', () => { | |
describe('spy', () => { | |
let spy; | |
before(() => { | |
let add = (...args) => args.reduce((a, b) => a + b); |
" Automatically install vim-plug | |
if empty(glob('~/.vim/autoload/plug.vim')) | |
silent !curl -fLo ~/.vim/autoload/plug.vim --create-dirs | |
\ https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim | |
autocmd VimEnter * PlugInstall --sync | source $MYVIMRC | |
endif | |
" Install plugins | |
call plug#begin() | |
Plug 'preservim/nerdtree' |
You know how it goes. SSH is something that nearly every developer uses every day, however, they only set it up a couple of times and then forget about it. And whenever you need to authenticate with SSH again, you just look up how to do it, never remembering how to do it because why would you?
SSH, which stands for Secure Shell, is a network protocol that enables a client to securely connect to a remote server. All user authentication, commands, outputs, and file transfers are encrypted to protect against attacks in the network. It is a more secure alternative to non-protected login protocols such as FTP.
- An NgModule declares a compilation context for a set of components that is dedicated to an application domain, a workflow, or a closely related set of capabilities.
- An NgModule can associate its components with related code, such as services, to form functional units.
- The root module,
AppModule
, typically resides in a file namedapp.module.ts
.
An NgModule is defined by a class with the @NgModule()
decorator, which is a function that tkaes a single metadata object. Some of the most important properties are:
declarations
: The components, directives, and pipes that belong to the module.exports
: The subset ofdeclarations
that should be visible in the component templates of other modules.imports
: Other modules whose exported classes are needed by component templates declared in this module.
import { Component } from '@angular/core'; | |
import { HttpClient } from '@angular/common/http'; | |
import { OnInit } from '@angular/core'; | |
import { map } from 'rxjs/operators'; | |
import { Observable } from 'rxjs'; | |
interface Todo { | |
userId: number | |
id: number | |
title: string |