Skip to content

Instantly share code, notes, and snippets.

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

Lukasz Hanusik lukaszhanusik

✨👁️🖤👁️✨ ⚡️
View GitHub Profile
title tags
Generating fake data using SQL
data fake db postgres sql

Fake data are very useful in development environment for testing your application or some query performances for example. In this Blog Post I’ll share how I created a simple SQL script for PostgreSQL 🐘 to generate some fake data. Enjoy!

Intro

I started this idea when I was testing some query changes and performance improvements on a PostgreSQL database. On the very first attempt my query failed miserably because the data that I had was not enough, and creating all the data with relations was so time consuming. I’ve done some research and finally I got some amazing scripts.

title tags
Querying Postgres Tables Directly From DuckDB
data analytics postgres duckdb mds olap

TLDR: DuckDB can now directly query queries stored in PostgreSQL and speed up complex analytical queries without duplicating data.

@lukaszhanusik
lukaszhanusik / content.md
Created September 12, 2022 18:17
Gist from Drafts

Gather is a command line tool that’s simple to run from the Terminal once you’ve set it up. For example, a command like

gather https://www.macstories.net/news/next-gen-airpods-pro-the-macstories-overview/ -c 
Obsidian iSH
@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');
    });
});
@font-face {
font-family: trustly-sans;
src: url('/resource/TrustlyBrand/fonts/webfonts/eot/TrustlySans-Regular.eot');
src: url('/resource/TrustlyBrand/fonts/webfonts/eot/TrustlySans-Regular.eot') format('embedded-opentype'), url("/resource/TrustlyBrand/fonts/webfonts/woff2/TrustlySans-Regular.woff2") format("woff2"), url("/resource/TrustlyBrand/fonts/webfonts/woff/TrustlySans-Regular.woff") format("woff");
font-weight: 400;
font-style: normal;
font-display: swap
}
@font-face {
/**
* 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')
{