Skip to content

Instantly share code, notes, and snippets.

View martin-juul's full-sized avatar
🇩🇰
Coding

Martin Juul martin-juul

🇩🇰
Coding
View GitHub Profile
@rrlevy
rrlevy / CORDOVA_RESOURCES_GENERATOR.md
Last active November 9, 2021 10:53 — forked from dalezak/README.md
Ionic Capacitor Resources Generator
  1. Run npm install cordova-res --save-dev
  2. Create 1024x1024px icon at resources/icon.png
  3. Create 2732x2732px splash at resources/splash.png
  4. Add "resources": "cordova-res ios && cordova-res android && node scripts/resources.js" to scripts in package.json
  5. Copy resources.js file to scripts/resources.js
  6. Run sudo chmod -R 777 scripts/resources.js
  7. Run npm run resources
@JamesHagerman
JamesHagerman / stslte-notes.md
Last active March 17, 2024 20:37
My notes about running srsLTE

srsLTE notes

These are notes I've taken while rying to get srslte up and running. This is messy, sorry...

Working solution - LimeSDR + SoapySDR + srsLTE

Dependencies:

sudo apt install tree vim git g++ make cmake pkg-config libpython-dev python-numpy swig libi2c-dev libusb-1.0-0-dev libfftw3-dev libmbedtls-dev libboost-program-options-dev libconfig++-dev libsctp-dev gnuradio
@tusharmath
tusharmath / trampoline.ts
Last active March 31, 2023 01:05
Trampolining in Typescript
// stub for typescript
declare function BigInt(n: number): number
abstract class Trampoline<A> {
abstract map<B>(ab: (a: A) => B): Trampoline<B>
abstract flatMap<B>(ab: (a: A) => Trampoline<B>): Trampoline<B>
zip<B>(tb: Trampoline<B>): Trampoline<[A, B]> {
const ta = this
return ta.flatMap(a => tb.map(b => [a, b] as [A, B]))
@dsully
dsully / bootstrap-osx
Created September 3, 2018 04:33
Script to bring up a new Mac
#!/bin/bash
PACKAGES=(
clipper
cloc
direnv
direnv
dnstracer
fd
git
@udondan
udondan / Example: golang gorm postgres uuid relation.md
Last active April 25, 2024 17:50
Example: golang gorm postgres uuid relation

Example: golang gorm postgres uuid relation

I was trying forever to get autoloading relationships working with postgres 9.4 and gorm and primary keys of type uuid.

Many tutorials and examples, even those on the official docs were just not workiong or missing important details.

The program in this gist creates the table structure and inserts a nested record. A parent and a child object is created by simply creating the child, which holds the relation to a parent. The child element then is queried by ID. The returned object holds the nested parent object.

Used package versions:

@niw
niw / download_macos_and_create_install_disk.sh
Last active July 18, 2023 10:44
A script to download macOS install image and create an install disk image
#!/usr/bin/env bash
set -e
VOLUME_PATH=/Volumes/installer
while getopts ":d:h" opts; do
case $opts in
d)
VOLUME_PATH=$OPTARG
;;
@kaplan81
kaplan81 / _testing.md
Last active August 8, 2022 19:27
Angular unit test helpers and samples

Testing

Helpers and examples for unit testing on Angular applications and libraries.

@jeffochoa
jeffochoa / 1.ProcessClass.php
Last active April 23, 2024 21:22
Understanding Laravel pipelines
<?php
namespace App\Features;
use App\Features\FirstTask;
use App\Features\SecondTask;
use Illuminate\Pipeline\Pipeline;
// *Naming things is hard* ... So, this is a class called `ProcessClass` that `run()` some text ¯\_(ツ)_/¯
class ProcessClass
@cweilguny
cweilguny / docker-compose-gitlab.yml
Last active October 27, 2021 00:55
A docker-compose config in v3 format for nginx-proxy with separate containers for nginx, dockergen and letsencrypt-companion. Additional example on how to get GitLab docker container running with this nginx-proxy setup. You need to create the docker network before, just run 'docker network create nginx-proxy'. Docker will tell you so if you don'…
version: '3'
services:
web:
image: 'gitlab/gitlab-ce:latest'
restart: always
hostname: 'gitlab.example.com'
environment:
GITLAB_OMNIBUS_CONFIG: |
external_url 'https://gitlab.example.com'
nginx['listen_port'] = 80
@alirobe
alirobe / reclaimWindows10.ps1
Last active April 26, 2024 17:59
This Windows 10 Setup Script turns off a bunch of unnecessary Windows 10 telemetery, bloatware, & privacy things. Not guaranteed to catch everything. Review and tweak before running. Reboot after running. Scripts for reversing are included and commented. Fork of https://github.com/Disassembler0/Win10-Initial-Setup-Script (different defaults). N.…
###
###
### UPDATE: For Win 11, I recommend using this tool in place of this script:
### https://christitus.com/windows-tool/
### https://github.com/ChrisTitusTech/winutil
### https://www.youtube.com/watch?v=6UQZ5oQg8XA
### iwr -useb https://christitus.com/win | iex
###
###