This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Random terminal tip #1 | |
//You'll see this message if you git commit without a message (-m) | |
// You can get out of it with two steps: | |
// 1.a. Type a multi-line message to move foward with the commit. | |
// 1.b. Leave blank to abort the commit. | |
// 2. Hit "esc" then type ":wq" and hit enter to save your choice. Viola! | |
# Please enter the commit message for your changes. Lines starting | |
# with '#' will be ignored, and an empty message aborts the commit. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'app-todo-item', | |
templateUrl: './todo-item.component.html', | |
styleUrls: ['./todo-item.component.scss'] | |
}) | |
export class TodoItemComponent implements OnInit { | |
@Input() id: Number; | |
@Input() title: String; | |
@Input() description: String; | |
@Input() done: Boolean; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: 'app-todo-list', | |
templateUrl: './todo-list.component.html', | |
styleUrls: ['./todo-list.component.scss'] | |
}) | |
export class TodoListComponent implements OnInit { | |
todos: todo[] = DEMO_TODOS; | |
constructor() { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="todo-list"> | |
<div *ngFor="let todo of todos"> | |
<app-todo-item | |
[id]="todo.id" | |
[title]="todo.title" | |
[description]="todo.description" | |
(onClick)="clickMarkAsDone(todo.id)" | |
> | |
</app-todo-item> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="todo-list"> | |
<div *ngFor="let todo of todos"> | |
<app-todo-item | |
[id]="todo.id" | |
[title]="todo.title" | |
[description]="todo.description" | |
(onClick)="clickMarkAsDone(todo.id)" | |
> | |
</app-todo-item> | |
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<a | |
// Shows the element if "routerLink" is truthy | |
*ngIf="routerLink" | |
// Passes the value of "routerLink" object in component to the anchor element | |
[routerLink]="routerLink" | |
// Sets the class name and uses the value of "modifier" to set an additional class name | |
class="button {{modifier}}" | |
// Sets the class "disabled" if the component object "isDisabled" is truthy | |
[class.disabled]="isDisabled" | |
// Sends the click event to the "clickLink" function in the component |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import React, { Component } from "react"; | |
import PropTypes from 'prop-types'; | |
class TodoItem extends Component { | |
render() { | |
return ( | |
<div className="todo-item"> | |
<span>{ this.props.title }</span> | |
<span>{ this.props.description }</span> | |
<div>{this.props.children}</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#Check the Drive Space Used by Cached Files | |
du -sh /var/cache/apt/archives | |
#Clean all the log file | |
#for logs in `find /var/log -type f`; do > $logs; done | |
logs=`find /var/log -type f` | |
for i in $logs |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// * Download a tile/thumbnail from the LandSat 8 dataset. | |
// Create directory called 'images' | |
// npm install request path async | |
// node GetNasaEarth lat lon | |
// * How program works | |
// First find all passes by date of the satellite, then request a thumbnail from the API | |
// Follow API through and download the images in batches of 5. | |
// Timing is to off-set throttling on the data-API. |
NewerOlder