Skip to content

Instantly share code, notes, and snippets.

@rameerez
rameerez / kamal-production-server-setup.sh
Last active January 16, 2025 01:06
Set up a Ubuntu server to deploy Kamal 2.x Docker containers to, hardened security and production ready
#!/bin/bash
# Production Docker Host Hardening Script v2
# For Ubuntu Server 24.04 LTS (Noble)
# Suitable for both Kamal deployment and builder hosts
set -euo pipefail
IFS=$'\n\t'
# --- Constants ---
@peppergrayxyz
peppergrayxyz / qemu-vulkan-virtio.md
Last active January 16, 2025 01:05
QEMU with VirtIO GPU Vulkan Support

QEMU with VirtIO GPU Vulkan Support

With its latest reales qemu added the Venus patches so that virtio-gpu now support venus encapsulation for vulkan. This is one more piece to the puzzle towards full Vulkan support.

An outdated blog post on clollabora described in 2021 how to enable 3D acceleration of Vulkan applications in QEMU through the Venus experimental Vulkan driver for VirtIO-GPU with a local development environment. Following up on the outdated write up, this is how its done today.

Definitions

Let's start with the brief description of the projects mentioned in the post & extend them:

@emvaized
emvaized / iconic_firefox.css
Last active January 16, 2025 00:53
Iconic Firefox — userChrome CSS snippet which adds back icons for most context and popup menu entries in Firefox. It uses mostly built-in icons.
/* Iconic Firefox (https://gist.github.com/emvaized/a379d61ed8970e5711ca7278a39c1895/) */
/* based on https://gist.github.com/qaz69wsx/83a90423163b65a8344b2e60fc356a58 (now removed) */
/* for better compatibility with dark mode, enable `svg.context-properties.content.enabled` in `about:config` */
:root{
--uc-popup-menu-icon-color:color-mix(in srgb, currentColor 75%, transparent);
}
.subviewbutton:not(.subviewbutton-iconic, [checked="true"], [targetURI])>.toolbarbutton-icon,
.subviewbutton:not(.subviewbutton-iconic, [checked="true"], [targetURI])>.protections-popup-footer-icon {
width:16px;
height:16px;
@gilbertozioma
gilbertozioma / Prepare-for-Techncal-Interview-and-Coding-Task-for-PHP-LaraveI.md
Last active January 16, 2025 00:52
Technical Interviews and Coding Tasks for PHP/Laravel Backend Developer role

These are the tasks you might encounter in your PHP/Laravel job interviews:

  1. Coding exercises: These may involve solving programming problems using PHP or other relevant languages, implementing algorithms, or working with data structures.

  2. API design and implementation: You might be asked to design and implement APIs to meet specific requirements or integrate with existing systems.

  3. Database queries: You could be given tasks that involve writing SQL queries to retrieve or manipulate data in a database.

  4. Framework-specific tasks: You may have tasks to work with Laravel.

@bpwebs
bpwebs / Code.gs
Created May 20, 2023 19:46
Visualize Google Sheets Data in HTML Charts - Create a Dashboard
/**
* Visualize Google Sheets Data in HTML Charts
* By: bpwebs.com
* Post URL: https://www.bpwebs.com/visualize-google-sheets-data-in-html-charts
*/
function doGet() {
let template = HtmlService.createTemplateFromFile('Index');
let html = template.evaluate().setTitle('Data Visualization Web App');
@tanaikech
tanaikech / submit.md
Created August 19, 2020 05:35
Converting Range in Google Spreadsheet as Image using Google Apps Script

Converting Range in Google Spreadsheet as Image using Google Apps Script

This is a sample script for converting a range in Google Spreadsheet as an image data using Google Apps Script. Unfortunately, there are no methods for directly converting the range in Google Spreadsheet as an image data in the built-in functions. So in this case, as a workaround, Charts Service is used.

Sample script

const range = "B5:D10";
const [header, ...values] = SpreadsheetApp.getActiveSheet()
 .getRange(range)
@jase-perf
jase-perf / p4ignore.txt
Last active January 16, 2025 00:49 — forked from ImLp/p4ignore.txt
Unreal Engine UGS P4 Ignore Example
## This p4ignore file is a combination of Epic's documentation, but
## adjusted to work even if its not in the same folder as the .uproject
## file, and the p4ignore gist from Luis Placid
# The syntax for P4IGNORE files is not the same as Perforce syntax.
# Instead, it is similar to that used by other versioning systems:
#
# - Files are specified in local syntax
# - a # character at the beginning of a line denotes a comment
# - a ! character at the beginning of a line excludes the file specification
@jase-perf
jase-perf / p4 universal game dev typemap
Created June 4, 2024 19:00
Game Engine Typemap (WIP) Engine-agnostic typemap that will work with UE, Unity, Godot, etc.
# Perforce File Type Mapping Specifications.
#
# TypeMap: a list of filetype mappings; one per line.
# Each line has two elements:
#
# Filetype: The filetype to use on 'p4 add'.
#
# Path: File pattern which will use this filetype.
#
# See 'p4 help typemap' for more information.
@obrassard
obrassard / Cloudflare Tunnel Setup.md
Created February 26, 2022 03:40
This quick guide will help you set up a Cloudflare Tunnel on your Linux server

Cloudflare Tunnel Setup on Linux

This quick guide will help you set up a Cloudflare Tunnel on your Linux server !

Cloudflare Tunnel provides you with a secure way to connect your resources to the web without a publicly routable IP address. With Tunnel, you do not send traffic to an external IP, instead, a lightweight daemon in your infrastructure (cloudflared) creates outbound-only connections to Cloudflare’s edge. Cloudflare Tunnel can connect HTTP web servers, SSH servers, remote desktops, and other protocols safely to Cloudflare. This way, your origins can serve traffic through Cloudflare without being vulnerable to attacks that bypass Cloudflare. (Source)

Getting Started

Pre-requisites

@oubiwann
oubiwann / 01-setup.sh
Last active January 16, 2025 00:43 — forked from digego/keynote.scm
Instructions for Running Andrew Sorensen's OSCON 2014 Keynote Performance
$ git clone https://gist.github.com/8b4404e538e61c7996a5.git
$ cd 8b4404e538e61c7996a5
$ mkdir salamander && cd salamander
$ curl -L -O https://archive.org/download/SalamanderDrumkit/salamanderDrumkit.tar.bz2
$ curl -L -O https://github.com/johnsen/drumsandpercussion/blob/master/SalamanderKick/salamanderdrum-kick-r1.tar.gz
$ curl -L -O http://freepats.zenvoid.org/Piano/SalamanderGrandPianoV3_44.1khz16bit.tar.bz2
$ tar xvfz salamanderDrumkit.tar.bz2
$ tar xvfz salamanderdrum-kick-r1.tar.gz
$ mv Kick/kick* OH/
$ tar xvfz SalamanderGrandPianoV3_44.1khz16bit.tar.bz2