Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@revofusion
revofusion / rune.ts
Created September 27, 2023 01:13
Rune Scripts: PrefixVarint and Base 26 (A=1) Name
/**
Convert between rune symbols and values using Base 26 (A=1)
Similar rust implementation at https://github.com/ordinals/ord/blob/f3cae5400fdebf31bfd494a02c846a90ea12310d/src/sat.rs#L63
*/
class Rune {
constructor(public value: number) { }
public get name(): string {
let x = this.value;
@radist2s
radist2s / canvasMatte.html
Last active April 23, 2024 16:31
Simple Canvas cliping with anti aliasing by alpha channel of mask image or canvas shape.
<canvas id="show" width="300" height="300"></canvas>
@SkaTeMasTer
SkaTeMasTer / .bashrc
Last active April 23, 2024 16:27
Edit /home/pi/.bashrc to display MOTD and welcome screen
# via https://github.com/rosterloh/raspberry-pi/blob/master/configs/.bashrc
#
# If not running interactively, don't do anything
[ -z "$PS1" ] && return
# don't put duplicate lines or lines starting with space in the history.
# See bash(1) for more options
HISTCONTROL=ignoreboth
# append to the history file, don't overwrite it
@disler
disler / ADA_v2_README.md
Created April 17, 2024 18:01
Personal AI Assistant: 'Ada' - v0.2

This is not working complete code.

This is strictly a v0.2, scrapy, proof of concept version of a personal AI Assistant working end to end in just ~726 LOC.

This is the second iteration showcasing the two-way prompt aka multi-step human in the loop. The initial, v0, assistant version is here.

It's only a frame of reference for you to consume the core ideas of how to build a POC of a personal AI Assistant.

To see the high level of how this works check out the explanation video. To follow our agentic journey check out the @IndyDevDan channel.

@luizomf
luizomf / settings.json
Created October 24, 2022 13:01
Configuração inicial do VS Code
{
"window.zoomLevel": 2,
"workbench.startupEditor": "none",
"explorer.compactFolders": false,
"workbench.iconTheme": "material-icon-theme",
"editor.fontSize": 18,
"workbench.colorTheme": "OM Theme (Default Dracula Italic)",
"code-runner.executorMap": {
"python": "clear ; python -u",
},
@TiborUdvari
TiborUdvari / ExcemptFromEncryption.cs
Last active April 23, 2024 16:22
Marks ITSAppUsesNonExemptEncryption in Unity generated Info.plist file to false. Doing this no longer requires manually marking the app as not using non-exempt encryption in iTunes Connect for Testflight beta testing.
using UnityEngine;
using UnityEditor.Build;
using UnityEditor.Build.Reporting;
using UnityEditor;
using UnityEditor.iOS.Xcode;
using System.IO;
public class ExcemptFromEncryption : IPostprocessBuildWithReport // Will execute after XCode project is built
{
public int callbackOrder { get { return 0; } }
@rahularity
rahularity / work-with-multiple-github-accounts.md
Last active April 23, 2024 16:21
How To Work With Multiple Github Accounts on your PC

How To Work With Multiple Github Accounts on a single Machine

Let suppose I have two github accounts, https://github.com/rahul-office and https://github.com/rahul-personal. Now i want to setup my mac to easily talk to both the github accounts.

NOTE: This logic can be extended to more than two accounts also. :)

The setup can be done in 5 easy steps:

Steps:

  • Step 1 : Create SSH keys for all accounts
  • Step 2 : Add SSH keys to SSH Agent
@Ircama
Ircama / Digispark.md
Last active April 23, 2024 16:21
Configuring the Digispark ATtiny85 board for Arduino IDE and upgrading the bootloader

Configuring the Digispark ATTINY85 board for Arduino IDE and upgrading the bootloader

Warning: this document has to be updated by pointing to https://github.com/SpenceKonde/ATTinyCore

This note describes the configuration of an ATtiny85 based microcontroller development board named Digispark and similar to the Arduino line. It is available in many online marketplaces for roughly 1 dollar (e.g., Ebay, Amazon, AliExpress) and is shipped fully assembled, including a V-USB interface (a software-only implementation of a low-speed USB device for Atmel's AVR microcontrollers). Coding is similar to Arduino: it uses the familiar Arduino IDE and is already provided with a ready-to-use bootloader (

@ahmadazimi
ahmadazimi / replace-zero-width-space.php
Last active April 23, 2024 16:20
PHP replace Zero Width Space using preg_replace
<?php
/**
* http://stackoverflow.com/questions/11305797/remove-zero-width-space-characters-from-a-javascript-string
* U+200B zero width space
* U+200C zero width non-joiner Unicode code point
* U+200D zero width joiner Unicode code point
* U+FEFF zero width no-break space Unicode code point
*/