Skip to content

Instantly share code, notes, and snippets.

@KarolinaCzo
KarolinaCzo / gist:d59da6820975938e70a5e7f6e57f8d8b
Last active July 5, 2019 08:19
Create a Fedora29/Fedora Workstation Virtual Machine
1) Install VB on Windows
https://www.virtualbox.org/wiki/Downloads
2) Create a new VM Machine:
https://fedoramagazine.org/install-fedora-virtualbox-guest/
amount of space: 250GB
RAM: with 32GB I gave it half - circa 16GB
After creating a new machine, right click on it and choose to display "Settings".
In "Storage" add Fedora Workspace ISO file to "Controller IDE".
More info here: https://docs.brew.sh/Homebrew-on-Linux
1) Installation script installs Homebrew:
sh -c "$(curl -fsSL https://raw.githubusercontent.com/Linuxbrew/install/master/install.sh)"
When instalation ends, you'll see next steps:
2) sudo dnf groupinstall 'Development Tools'
3) eval $(/home/linuxbrew/.linuxbrew/bin/brew shellenv)
@KarolinaCzo
KarolinaCzo / gist:4792e99c275da85c937ed43a1e97abd9
Last active March 8, 2019 18:00
Make a script to run SynfigStudio from the console on Linux Fedora
1) Stwórz katalog o nazwie 'bin' w katalogu domowym
2) Teraz, jeżeli skrypt był zapisany wczesniej w pliku z jakimkolwiek rozszerzeniem (w tym wypadku .txt)
trzeba go przepisać na plik bez rozszerzenia.
Jeżeli wcześniej wejdziemy do folderu, w którym znajduje się skrypt to wystarczy podac jego nazwę bezpośrednio.
mv <nazwa-skryptu> ~/bin/<nowa-nazwa-skryptu>
Jeśli natomiast nie jesteśmy w folderze z tym plikiem, to nalezy podac do niego ścieżkę bezwzględną.
mv <ścieżka-do-skryptu> ~/bin/<nowa-nazwa-skryptu>
More info here:
https://github.com/robbyrussell/oh-my-zsh
1) Install zsh:
sudo dnf install zsh
2) Install zsh as the main shell (from Basic Installation)
sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"
3) To make sure it's installed correctly and added as the main shell check /etc/passwd file:
@KarolinaCzo
KarolinaCzo / gist:3ada22bd9f60f12883e80737488bcd64
Created February 23, 2019 22:07
Fedora KDE 29 random directories in home directory
Solution here: https://superuser.com/questions/1394044/fedora-kde-29-random-directories-in-home-directory/1394355
@KarolinaCzo
KarolinaCzo / gist:5c2d4f793dde63f9b47dd89f8c461731
Created February 11, 2019 10:33
Instructions for preparing a VisualStudio configuration file for a project
To prepare a list of VisualStudioCode extensions on the Fedora 29 system invoke the console:
ls ~/.vscode/extensions/ > ~/extensions
The file with extensions will be saved in the Home Catalog.
List of extensions for Vikijob:
angular.ng-template-0.1.11
christian-kohler.path-intellisense-1.4.2
1) HTML:
<!-- New case -->
<div class="container card">
<div class="card-body">
<div class="row">
<div class="col-12">
<ngb-tabset class="new-case-details-tabset">
<ngb-tab title="Widok formularza sprawy">
@KarolinaCzo
KarolinaCzo / gist:22e190fbc16c8060c8699140d52ad02c
Created August 22, 2018 11:38
Nice way of displaying messages for the user - Angular Toastr - Angular 2/6
Install Angular Toastr - follow steps described here:
https://github.com/scttcper/ngx-toastr
https://scttcper.github.io/ngx-toastr/
1) To display a message for the User you need create a private 'toast.service'. Example here:
import { Injectable } from '@angular/core';
import { ToastrService } from 'ngx-toastr';
// If we would like to show error connected with http response: import { HttpErrorResponse } from '@angular/common/http';
@Injectable()
@KarolinaCzo
KarolinaCzo / gist:94bbd5abf80ad05d9ff7059bbcb0a787
Created August 22, 2018 07:05
Not declared APP_BASE_HREF - unit tests Angular 2/6
You need to declare APP_BASE_HREF in your app - more info on this here:
https://angular.io/api/common/APP_BASE_HREF
I added this in the 'app.module'
providers: [{ provide: APP_BASE_HREF, useValue: '/' }],
You can also add it directly in the test file, also as providers.
@KarolinaCzo
KarolinaCzo / gist:7d19a5b855641e6fd652487e23f41865
Last active August 22, 2018 11:28
Fixing: ERROR in node_modules/@ngrx/store/src/store_module.ts(23,66): error TS1183: An implementation cannot be declared in ambient contexts.
More on this here:
https://stackoverflow.com/questions/37448491/angular-2-typescript-an-implementation-cannot-be-declared-in-ambient-contexts
And here:
https://basarat.gitbooks.io/typescript/content/docs/types/ambient/d.ts.html
What worked for me:
1) Find: ode_modules/@ngrx/store/src/store_module.ts
2) Removed '.d' from store_module.d.ts -> when I did this the project didn't compile :P
2) Then I added the '.d' again and everything worked :)