Skip to content

Instantly share code, notes, and snippets.

View kuncevic's full-sized avatar
🎯
Focusing

Aliaksei Kuncevič kuncevic

🎯
Focusing
View GitHub Profile
name: Deploy Monorepo
on:
push:
path: projects/app1
branches: [master, staging]
pull_request:
types: [opened, synchronize, reopened]
jobs:
build:
steps:
@kuncevic
kuncevic / figletpreview.sh
Created September 20, 2021 09:14 — forked from crahan/figletpreview.sh
Print out a preview of all installed Figlet fonts.
#!/bin/sh
if [ "$#" -ne 1 ]; then
echo "I need some text to print."
exit 1
fi
for i in `ls /usr/local/Cellar/figlet/2.2.5/share/figlet/fonts/*.flf`; do
echo -e "==== $(basename $i) ====\n"
figlet -f $i $1
@kuncevic
kuncevic / ngconf-snippets-new.md
Created May 7, 2021 08:12 — forked from brandonroberts/ngconf-snippets-new.md
Component Router (New) snippets

Snippets for workshop

Step 1 - Home Route

<base href="/">

'@angular/router':                   { main: 'index.js', defaultExtension: 'js' },

import {ROUTER_PROVIDERS} from '@angular/router';
@kuncevic
kuncevic / child.component.html
Created March 1, 2021 23:01
NGXS Data example.
<div class="wrapper">
<div class="title">
Child 👦
</div>
<div class="content">
<div class="action">
<button (click)="counter.updateValue2(-1)">-1</button>
<span class="value"> {{ counter.snapshot.value2 }}</span>
<button (click)="counter.updateValue2(1)">+1</button>
</div>
@kuncevic
kuncevic / landingpage.html
Created January 7, 2021 11:28 — forked from jasonalderman/landingpage.html
Simple, single-page, "coming soon" landing page template.
<!DOCTYPE html>
<html>
<head>
<!-- This is a template for a landing page!
✓ Fill in the things between the {{double braces}}, removing the {{ and }} in the process.
✓ Make a logo image for the <img> tag, and take note of its width and height.
✓ Make a sharing image for the OpenGraph/Facebook/Twitter <meta> tags (square, 1200x1200px).
✓ Tweak CSS as necessary.
✓ Rename this file to index.html and upload it and the two images to the web root directory on your server.
✓ Remove this comment when done. -->
export class ResetCounter {
public static type = '[Counter] Reset Count';
constructor() {}
}
export class UpdateValue1 {
public static type = '[Sum] Update Value1';
constructor(public readonly amount: number) {}
}
@kuncevic
kuncevic / reactive-services-1.ts
Last active September 6, 2020 10:00
Reactive Services with BehaviourSubject
export class CounterService {
private data$ = new BehaviorSubject<Counter>(initialState);
state$ = this.data$.asObservable();
constructor() {}
public setValue1(value1): void {
const currentData = this.data$.getValue();
this.data$.next({ ...currentData, value1: currentData.value1 + value1 });
}
@kuncevic
kuncevic / terminal-gif.md
Created June 18, 2019 07:37 — forked from protrolium/terminal-gif.md
convert images to GIF in Terminal

Install ImageMagick

brew install ImageMagick

Pull specific region of frames from video file w/ ffmpeg

ffmpeg -ss 14:55 -i video.mkv -t 5 -s 480x270 -f image2 %04d.png

  • -ss 14:55 gives the timestamp where I want FFmpeg to start, as a duration string.
  • -t 5 says how much I want FFmpeg to decode, using the same duration syntax as for -ss.
  • -s 480x270 tells FFmpeg to resize the video output to 480 by 270 pixels.
  • -f image2 selects the output format, a series of still images — make sure there are leading zeros in filename.
@kuncevic
kuncevic / osx_wifi_strenght_command_line.sh
Created March 4, 2019 01:22 — forked from miglen/osx_wifi_strenght_command_line.sh
Mac OS X Wifi Signal strength meter command line
#!/bin/bash
# Simple command to display the wireless strenght signal
#
clear
while x=1
do /System/Library/PrivateFrameworks/Apple*.framework/Versions/Current/Resources/airport -I \
| grep CtlRSSI \
| sed -e 's/^.*://g' \
| xargs -I SIGNAL printf "\rWifi dBm: SIGNAL"
sleep 0.5