Skip to content

Instantly share code, notes, and snippets.

View kostyrko's full-sized avatar
🎯
Forward March

Mikołaj kostyrko

🎯
Forward March
View GitHub Profile
// 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.
@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;
@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() { }
<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>
<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>
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>
@kostyrko
kostyrko / clean.sh
Created October 14, 2020 07:10 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/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
@kostyrko
kostyrko / GetNasaEarth.js
Created July 23, 2020 16:37 — forked from alexellis/GetNasaEarth.js
NASA Earth Imagery, download tool - node.js
// * 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.
@kostyrko
kostyrko / fetch-api-examples.md
Created July 21, 2020 15:32 — forked from justsml/fetch-api-examples.md
JavaScript Fetch API Examples