Skip to content

Instantly share code, notes, and snippets.

@matthewbeta
matthewbeta / scrim-gradient.scss
Last active May 21, 2024 06:35
A simple little SCSS mixin for creating scrim gradients
/*
A simple little SCSS mixin for creating scrim gradients
Inspired by Andreas Larson - https://github.com/larsenwork
https://css-tricks.com/easing-linear-gradients/
*/
@mixin scrimGradient($startColor: $color-black, $direction: 'to bottom') {
$scrimCoordinates: (
@robinsmidsrod
robinsmidsrod / _INSTALL.md
Last active May 21, 2024 06:35
Bootstrapping full iPXE native menu with customizable default option with timeout (also includes working Ubuntu 12.04 preseed install)

Add the following chunk to your existing ISC dhcpd.conf file.

if exists user-class and ( option user-class = "iPXE" ) {
    filename "http://boot.smidsrod.lan/boot.ipxe";
}
else {
    filename "undionly.kpxe";
}

(or see https://gist.github.com/4008017 for a more elaborate setup

@yorickdowne
yorickdowne / README.md
Last active May 21, 2024 06:31
Ubuntu Desktop 20.04 with mirrored ZFS boot drive

Overview

Ubuntu Desktop 20.04 supports a single ZFS boot drive out of the box. I wanted a ZFS mirror, without going through an entirely manual setup of Ubuntu as described by OpenZFS in their instructions for Ubuntu 20.04 and instructions for Ubuntu 22.04

This adds a mirror to an existing Ubuntu ZFS boot drive after the fact. It's been tested on Ubuntu 20.04 by me and all the way up to Ubuntu 22.10 by users in comments.

ZFS requires native encryption to be added at pool / dataset creation. Ubuntu 22.04 supports this during installation. Whether these instructions are suitable for mirroring such a setup has not been tested. For Ubuntu 20.04, these instructions are not suitable for creating an encrypted ZFS boot disk, please use the full instructions linked above for that. You can, however, add an en

@ilebedie
ilebedie / python_like_print.hpp
Created July 14, 2015 10:28
Python-like print in c++
#include <iostream>
using namespace std;
void print(){cout<<'\n';}
template<typename T, typename ...TAIL>
void print(const T &t, TAIL... tail)
{
cout<<t<<' ';
@mmozeiko
mmozeiko / !README.md
Last active May 21, 2024 06:27
Download MSVC compiler/linker & Windows SDK without installing full Visual Studio

This downloads standalone 64-bit MSVC compiler, linker & other tools, also headers/libraries from Windows SDK into portable folder, without installing Visual Studio. Has bare minimum components - no UWP/Store/WindowsRT stuff, just files & tools for 64-bit native desktop app development.

Run python.exe portable-msvc.py and it will download output into msvc folder. By default it will download latest available MSVC & Windows SDK - currently v14.32.17.2 and v10.0.22621.0.

You can list available versions with python.exe portable-msvc.py --show-versions and then pass versions you want with --msvc-version and --sdk-version arguments.

To use cl.exe/link.exe from output folder, first run setup.bat - after that PATH/INCLUDE/LIB env variables will be setup to use all the tools as usual. You can also use clang-cl.exe with these includes & libraries.

To use clang-cl.exe without running setup.bat, pass extra /winsysroot msvc argument (msvc is folder name where output is stored).

@abhishekkhaware
abhishekkhaware / gist:7152721
Last active May 21, 2024 06:26
Create An Alias For Laravel and Codecept in Windows PowerShell.
# Laravel Artisan Commands Shortcut
function art($arg1,$arg2,$arg3,$arg4,$arg5) { php artisan $arg1 $arg2 $arg3 $arg4 $arg5}
Set-Alias a art
#### Use as by default Alias #####
# ge:r => generate:resource
# ge:c => generate:controller
@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 21, 2024 06:25
crack activate Office on mac with license file
@bkdinoop
bkdinoop / login-example
Last active May 21, 2024 06:25
Flask-Login : login.py created by https://github.com/maxcountryman : Matthew Frazier
# -*- coding: utf-8 -*-
"""
Flask-Login example
===================
This is a small application that provides a trivial demonstration of
Flask-Login, including remember me functionality.
:copyright: (C) 2011 by Matthew Frazier.
:license: MIT/X11, see LICENSE for more details.
"""
@choco-bot
choco-bot / 1.RegistrySnapshot.xml
Created May 21, 2024 06:24
cosmic-comics v2.1.1 - Passed - Package Tests Results
<?xml version="1.0" encoding="utf-8"?>
<registrySnapshot xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<user>S-1-5-21-2412192122-1938444825-1709503042-1000</user>
<keys>
<key installerType="Custom" displayName="Cosmic-Comics 2.1.0" displayVersion="2.1.0">
<RegistryView>Registry64</RegistryView>
<KeyPath>HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\4a525bd5-fa5f-5dd3-9bb6-56466846d973</KeyPath>
<DefaultValue />
<InstallLocation><![CDATA[]]></InstallLocation>
<UninstallString><![CDATA["C:\Users\vagrant\AppData\Local\Programs\cosmiccomics\Uninstall Cosmic-Comics.exe" /currentuser /S]]></UninstallString>
const fetchStream = async (request)=>{
const controller = new AbortController();
try {
const option = {
method:request.method,
mode:request.mode,
credentials: 'include',
signal:controller.signal
};
if(request.headers) option.headers = request.headers;