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
$ npm create tauri-app |
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
{ | |
"require": "ts-node/register", | |
"watch-files": [ | |
"./e2e/**/*.ts" | |
], | |
"timeout": 300000 | |
} |
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
# delete local tag '12345' | |
git tag -d 12345 | |
# delete remote tag '12345' (eg, GitHub version too) | |
git push origin :refs/tags/12345 | |
# alternative approach | |
git push --delete origin tagName | |
git tag -d tagName |
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
@HostListener('window:resize', ['$event']) | |
onResize(event) { | |
// magic here | |
} |
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
<ng-container*ngIf="isLoggedIn; then loggedIn; else loggedOut"></ng-container> | |
<ng-template #loggedIn> | |
<div> | |
Welcome back, friend. | |
</div> | |
</ng-template> | |
<ng-template #loggedOut> | |
<div> | |
Please friend, login. |
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 { Pipe, PipeTransform } from '@angular/core'; | |
@Pipe({ | |
name: 'fileSize' | |
}) | |
export class FileSizePipe implements PipeTransform { | |
private units = [ | |
'bytes', | |
'KB', |
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
var gulp = require('gulp'); | |
gulp.task('watch', function() { | |
return gulp.watch('./source/**/*', function(obj){ | |
if( obj.type === 'changed') { | |
gulp.src( obj.path, { "base": "./source/"}) | |
.pipe(gulp.dest('./dest')); | |
} | |
}); | |
}); |
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 {Renderer } from '@angular/core'; | |
export class ImagegalleryComponent implements OnInit { | |
constructor(private renderer: Renderer, private imageService: ImageService) { | |
this._renderer.listen('document', 'dragstart', (evt) => { | |
this.imageService.setImageToUpload(evt.path[0].src, evt.path[0].id); | |
}); | |
} |
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 ng-class="condition ? 'class-if-true' : 'class-if-false'"> |
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
/** | |
* Start Download | |
*/ | |
public void startDownload(String link, String filename) { | |
Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS).mkdirs(); | |
DownloadManager mManager = (DownloadManager) getSystemService(Context.DOWNLOAD_SERVICE); | |
DownloadManager.Request mRqRequest = new DownloadManager.Request(Uri.parse(link)); | |
mRqRequest.setDescription("Download file..."); |
NewerOlder