Skip to content

Instantly share code, notes, and snippets.

@zthxxx
zthxxx / Activate Office 2019 for macOS VoL.md
Last active May 1, 2024 22:04
crack activate Office on mac with license file
@howyay
howyay / Setting up Postfix on Debian.md
Last active May 1, 2024 22:04
A guide to set up a Postfix + Dovecot IMAP server with complete spf, dkim and dmarc support.

An ultimate guide to Postfix + Dovecot IMAP server with complete SPF, DKIM and DMARC support and additional instructions for a multi-domain setup

In this guide, domain.com will be your root domain and mail.domain.com will be the hostname of your mail server

Draft Article: Harnessing the Power of 1 Million Tokens with Hypergraph Prompting

Introduction:

Building prompts for one million token context windows necessitates a complete reimagining of how prompts are created, signaling a pivotal transformation in artificial intelligence with the introduction of Google's Gemini 1.5. This groundbreaking advancement, featuring an extensive context window of 1 million tokens, challenges us to devise innovative approaches like hypergraph prompting. This method intricately weaves together the spatial, temporal, relational, and executional dimensions of data, creating a visual and logical fabric of connections that mirrors the interconnected spirals of a DNA strand, to navigate and effectively leverage this vast informational expanse.

Understanding the Scale of a 1 Million Token Context Window:

Imagine a context window of 1 million tokens as a vast library containing hundreds of books, thousands of pages, or hours of multimedia content, all accessible in a sing

@TravisEvashkevich
TravisEvashkevich / gist:390e100fddf1f9cd572b367446ccf547
Last active May 1, 2024 22:03
Pytoshop and Pillow PSD Creation
#imports
from PIL import Image
import numpy
import pytoshop
from pytoshop.user import nested_layers
from pytoshop import enums
from pytoshop.image_data import ImageData
#Convert Pillow image to pyto layer (not fool proof by anymeans)
def pillow_image_to_pyto_image(name, image, x, y, visible, opacity, group_id, blend_mode, metadata, layer_color, color_mode, width = 0, height = 0):
@fabiocicerchia
fabiocicerchia / combos.php
Last active May 1, 2024 22:02 — forked from farinspace/combos.php
PHP - Generate all the possible combinations among a set of nested arrays.
/**
* Generate all the possible combinations among a set of nested arrays.
*
* @param array $data The entrypoint array container.
* @param array $all The final container (used internally).
* @param array $group The sub container (used internally).
* @param mixed $val The value to append (used internally).
* @param int $i The key index (used internally).
*/
function generate_combinations(array $data, array &$all = array(), array $group = array(), $value = null, $i = 0)
@marioloncarek
marioloncarek / collection-blocks.liquid
Created September 5, 2018 09:18
Shopify collection blocks
<section class="collection-blocks">
{% for block in section.blocks %}
{%- assign collection = collections[block.settings.collection] -%}
{% if block.settings.collection-title != blank %}
<h2 class="collection-blocks__collection-title">{{ block.settings.collection-title | escape }}</h2>
{% else %}
<h2>{{ collection.title }}</h2>

Converting audio to AAC with Fraunhofer FDK AAC (libfdk_aac) in FFmpeg

Check if you have an FFmpeg build supporting libfdk_aac

Run:

ffmpeg -hide_banner -h encoder=libfdk_aac
@aamiaa
aamiaa / CompleteDiscordQuest.md
Last active May 1, 2024 21:54
Complete Recent Discord Quest

Complete Recent Discord Quest

Note

This no longer works in browser!

Note

This no longer works if you're alone in vc! Somebody else has to join you!

How to use this script:

  1. Accept the quest under User Settings -> Gift Inventory
@joelotz
joelotz / cue2labels.py
Last active May 1, 2024 21:51
Convert a music .cue file into a label file. This module will accept an optional string attribute that specifies the input .cue file. If this file is not provided in the call then file-select box will be presented to the user. Output is a .txt file of labels that can be input into Audacity.
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
"""Convert a music .cue file into a label file.
This module will accept an optional string attribute that specifies the input
.cue file. If this file is not provided in the call then file-select box will
be presented to the user. Output is a .txt file of labels that can be input
into Audacity.
Examples:
@obsoke
obsoke / FYT_Rust_Notes.md
Created January 4, 2017 04:06
Fix Your Timestep Notes - Rust Style

Simple: Fixed Delta Time

let mut t: 0.0;
let dt = 1.0 / 60.0;

loop {
    update(t, dt);
    render();