Skip to content

Instantly share code, notes, and snippets.

@Khaadahmed
Khaadahmed / index.html
Created March 28, 2024 21:03
Responsive Dashboard | Chart.js
<body>
<nav class="main-menu">
<div>
<div class="user-info">
<img
src="https://github.com/ecemgo/mini-samples-great-tricks/assets/13468728/e5a707f4-d5ac-4f30-afd8-4961ae353dbc"
alt="user" />
<p>Mia Taylor</p>
</div>
<ul>
@gabe565
gabe565 / change-arc-icon.md
Last active March 28, 2024 21:02
Change Arc Browser Icon

Change Arc Browser Icon

arc

A collection of commands that change the Arc Browser icon.

Commands

Theme Command
Candy Arc defaults write company.thebrowser.Browser currentAppIconName candy

A good way to think about a buffer or an image descriptor is to imagine it as a very fat pointer. This is, in fact, not too far removed from reality, as we shall see.

Taking a peek at radv, we find the uniform buffer and storage buffer descriptors to be a 4-word tuple, where the first two words make up the address, followed by length in bytes for bounds checking and an extra word, which holds format information and bounds checking behavior [^1].

Similarly, the sampled image descriptor is a 16-word tuple containing an

@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 21:01
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@porjo
porjo / pulseaudio_rtp.md
Last active March 28, 2024 21:01
Use Pulseaudio to stream audio file to network via RTP

RTP Server

Setup

pacmd load-module module-null-sink sink_name=rtp format=s16le channels=1 rate=16000
pacmd load-module module-rtp-send source=rtp.monitor

This sets up a multicast socket for RTP streams. When I tested this was 224.0.0.56:46136

@jbaranski
jbaranski / SelfHostOpenStreetMapDocker.md
Created August 1, 2020 14:52
How to self host an Open Street Map server (using Docker)

Here are the steps needed to run a self hosted Open Street Map server (using Docker):

  1. Download desired pbf files (like south-carolina-latest.osm.pbf) from https://download.geofabrik.de or just use the following empty planet below:

    
      <?xml version='1.0' encoding='UTF-8'?>
      <osm version="0.6" generator="osmconvert 0.8.8" timestamp="2019-10-23T20:18:02Z">
        <bounds minlat="42.4276" minlon="1.412368" maxlat="42.65717" maxlon="1.787481"/>
      </osm>
    
@MarkWarneke
MarkWarneke / Makefile
Created June 18, 2020 12:25
Makefile for python code
# Makefile for python code
#
# > make help
#
# The following commands can be used.
#
# init: sets up environment and installs requirements
# install: Installs development requirments
# format: Formats the code with autopep8
# lint: Runs flake8 on src, exit if critical rules are broken
@triman
triman / MgrsHelper.cs
Last active March 28, 2024 20:56
Helper class to handle MGRS and UTM coordinates and convert <=> Wgs84. This is a C# port of https://github.com/proj4js/mgrs
using System;
using System.Linq;
using System.Text.RegularExpressions;
namespace MgrsConverter
{
/// <summary>
/// C# port of https://github.com/proj4js/mgrs
/// </summary>
public static class MgrsHelper
@markasoftware
markasoftware / enterprise_token.rb
Last active March 28, 2024 20:54
OpenProject Enterprise mode for free
############ REPLACE app/models/enterprise_token.rb in the source code with this file! ################
############ also be sure to RESTART OpenProject after replacing the file. ################
############ it doesn't show that enterprise mode is enabled in the settings, but all ################
############ enterprise mode features, such as KanBan boards, are enabled. ################
#-- copyright
# OpenProject is an open source project management software.
# Copyright (C) 2012-2023 the OpenProject GmbH
#
# This program is free software; you can redistribute it and/or
# modify it under the terms of the GNU General Public License version 3.