Skip to content

Instantly share code, notes, and snippets.

View lukaszhanusik's full-sized avatar
✨👁️🖤👁️✨ ⚡️

Lukasz Hanusik lukaszhanusik

✨👁️🖤👁️✨ ⚡️
View GitHub Profile
How To Power Up SFDX-CLI with VS Code Remote - SSH, Windows Edition
by Vernon Keenan
from SalesforceDevops.net
Youtube: https://youtu.be/vdwM2WOUBuk
Change these values for your environment:
devops = DNS hostname of remote SSH server
vern = Linux username on remote server
@lukaszhanusik
lukaszhanusik / customers-and-loans.sql
Created May 10, 2024 21:58 — forked from Bilbottom/customers-and-loans.sql
Mermaid + DuckDB for generating customer hierarchy diagrams
/*
Mermaid + DuckDB for generating customer hierarchy diagrams
DuckDB version: 0.10.2
Bill Wallis, 2024-05-09
*/
select version();
@lukaszhanusik
lukaszhanusik / er-diagram.mermaid
Created May 10, 2024 21:57 — forked from Bilbottom/er-diagram.mermaid
Mermaid + DuckDB for generating entity-relationship diagrams
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@lukaszhanusik
lukaszhanusik / nerd_fonts.sh
Created January 1, 2023 14:12 — forked from davidteren/nerd_fonts.md
Install Nerd Fonts via Homebrew [updated & fixed]
# Nerd Fonts for your IDE
# https://www.nerdfonts.com/font-downloads
brew tap homebrew/cask-fonts && brew install --cask font-3270-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-fira-mono-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-go-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-lgc-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-inconsolata-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-monofur-nerd-font
brew tap homebrew/cask-fonts && brew install --cask font-overpass-nerd-font
@lukaszhanusik
lukaszhanusik / reinstall_git_brew.md
Created May 2, 2022 18:01 — forked from brandonsimpson/reinstall_git_brew.md
Re-installing Git on Mac OSX with Brew

Re-installing Git on Mac OSX with Brew

This is helpful if you've previously installed git from source on OSX, and other compilers can't find the correct path. You need to remove the current version of git, then re-install with brew.

Uninstall git if installed manually

  1. Check which git you're running:
    which git
    
@lukaszhanusik
lukaszhanusik / example.md
Created April 15, 2022 11:49 — forked from gghughunishvili/example.md
Postman pm.sendRequest example

To send a request via the sandbox, you can use pm.sendRequest.

pm.test("Status code is 200", function () {
    pm.sendRequest('https://postman-echo.com/get', function (err, res) {
        pm.expect(err).to.not.be.ok;
        pm.expect(res).to.have.property('code', 200);
        pm.expect(res).to.have.property('status', 'OK');
    });
});
/**
* Created by brettbarlow on 2/24/18.
*/
// LightningComponentInVisualforce
window._lightningComponentInVisualforce = (function() {
return {
LightningComponent : function(type, attributes, locator) {
this.type = type;
this.attributes = attributes;
'use strict'
class JSONMap extends Map {
constructor (value) {
let mapArgs = []
if (value) {
for (let k of Object.keys(value)) {
mapArgs.push([ k, value[k] ])
}
}
@lukaszhanusik
lukaszhanusik / localstorage.js
Created September 23, 2021 00:53 — forked from vishnu-prasad-r/localstorage.js
Javascript snippet to use HTML5 localStorage easily. Supports storing any kind of data. Handles commonly occuring exceptions like localStorage quota being exceeded and browser not supporting localStorage. .
/*Javascript snippet to use HTML5 localStorage easily.
Properly handles situation like 'localStorage not being supported by the browser' and excedding localSorage quota.
Supports storing any kind of data */
/*key should be String, value can be any Javascript object */
function writeToLocalStorage(key,value)
{
if(typeof(Storage) == 'undefined')
{
@lukaszhanusik
lukaszhanusik / group-objects-by-property.md
Created September 22, 2021 05:17 — forked from mikaello/group-objects-by-property.md
Group Array of JavaScript Objects by Key or Property Value

Group array of JavaScript objects by keys

This fork of JamieMason's implementation changes the key parameter to be an array of keys instead of just a single key. This makes it possible to group by multiple properties instead of just one.

Implementation

const groupBy = keys => array =>
  array.reduce((objectsByKeyValue, obj) => {
    const value = keys.map(key => obj[key]).join('-');