Skip to content

Instantly share code, notes, and snippets.

View jerkovicl's full-sized avatar

Luka Jerković jerkovicl

View GitHub Profile
#!/bin/bash
# LINUX UPGRADE: sudo RELEASE_UPGRADER_ALLOW_THIRD_PARTY=1 do-release-upgrade
sudo -i
# install dependencies
add-apt-repository universe
apt-get update
apt-get install -y apparmor-utils apt-transport-https avahi-daemon ca-certificates curl dbus jq network-manager socat software-properties-common acl
# install docker

How to get @DevBlackOps Terminal-Icons module working in PowerShell on Windows

Note: since version 0.1.1 of the module this now works in Windows PowerShell or PowerShell Core.

  1. Download and install this version of Literation Mono Nerd Font which has been specifically fixed to be recognised as monospace on Windows:

https://github.com/haasosaurus/nerd-fonts/blob/regen-mono-font-fix/patched-fonts/LiberationMono/complete/Literation%20Mono%20Nerd%20Font%20Complete%20Mono%20Windows%20Compatible.ttf

(see this issue for more info: ryanoasis/nerd-fonts#269)

@jerkovicl
jerkovicl / userDefineLang_Dockerfile.xml
Created April 5, 2023 11:58 — forked from centic9/userDefineLang_Dockerfile.xml
notepad++ syntax highlighting for Dockerfiles, store at something like C:\Users\[user]\AppData\Roaming\Notepad++\userDefineLangs\userDefineLang_Dockerfile.xml
<NotepadPlus>
<UserLang name="Dockerfile" ext="Dockerfile" udlVersion="2.1">
<Settings>
<Global caseIgnored="no" allowFoldOfComments="no" foldCompact="no" forcePureLC="1" decimalSeparator="0" />
<Prefix Keywords1="no" Keywords2="yes" Keywords3="no" Keywords4="no" Keywords5="no" Keywords6="no" Keywords7="no" Keywords8="no" />
</Settings>
<KeywordLists>
<Keywords name="Comments">00# 01 02 03 04</Keywords>
<Keywords name="Numbers, prefix1"></Keywords>
<Keywords name="Numbers, prefix2"></Keywords>
@jerkovicl
jerkovicl / gaEventTracking.js
Last active April 4, 2023 18:36
Google Analytics Custom Event Tracking
https://developers.google.com/analytics/devguides/collection/gajs/eventTrackerGuide
_gaq.push(['_trackEvent', 'api error', 'api_name', 'status code: ' + jqXHR.status]);
function noErrorMa() {
return true;
}
window.onerror = noErrorMa;
window.onerror = function (errorMsg, url, lineNumber, column, errorObj) {
if (errorMsg.indexOf('Script error.') > -1) {
return;
@jerkovicl
jerkovicl / github_copilot_cli_powershell.md
Last active April 2, 2023 11:36
How to set alias in powershell for Github Copilot CLI
function checkResponse {
  if ( $Args[0] -eq $true ) {
    $fileContents = Get-Content $tempFile
    Write-Host $fileContents
    # write contents of file to console (basically EVAL())
    Invoke-Expression $fileContents
  }
  else {
// Imports the Google Cloud client library
import { TextToSpeechClient } from '@google-cloud/text-to-speech';
import fs from 'fs-extra';
import { promisify } from 'util';
// Creates a client
const client = new TextToSpeechClient();
const convertSSMLtoAudio = async (ssmlText: any, langCode: string, gender: string) =>
// eslint-disable-next-line no-async-promise-executor
new Promise(async (resolve, reject) => {
try {

LERNA COMMANDS

Versioning cheatsheet

  • MAJOR version when you make incompatible API changes,
  • MINOR version when you add functionality in a backward-compatible manner, and
  • PATCH version when you make backward-compatible bug fixes.
#Reference: https://www.smarthomebeginner.com/traefik-reverse-proxy-tutorial-for-docker
#Requirement: nano .env -> Set environmental variables: ${$USERDIR}, ${PUID}, ${PGID}, ${TZ}, ${DOMAINNAME}, ${CLOUDFLARE_EMAIL}, ${CLOUDFLARE_API_KEY}, ${HTTP_USERNAME}, ${HTTP_PASSWORD}, ${PLEX_CLAIM} etc. as explained in the reference.
version: "3.7"
services:
######### FRONTENDS ##########
# Traefik Reverse Proxy
traefik:
@jerkovicl
jerkovicl / Angular2DotNetCoreResources.md
Last active May 16, 2022 08:20
Angular 2 and .NET Core resources and tutorials
@jerkovicl
jerkovicl / git.merge.md
Created March 3, 2022 15:52 — forked from hashg/git.merge.md
How to get changes from another branch
  • go to the master branch our-team

git checkout our-team

  • pull all the new changes from our-team branch

git pull

  • go to your branch featurex

git checkout featurex

  • merge the changes of our-team branch into featurex branch