Skip to content

Instantly share code, notes, and snippets.

View suissa's full-sized avatar
🏠
Working from home

suissAI suissa

🏠
Working from home
View GitHub Profile
declare const __SemanticType: unique symbol;
type PrimitiveUnwrapped =
| string
| number
| boolean
| null
| undefined;
@ityonemo
ityonemo / test.md
Last active June 2, 2026 13:54
Zig in 30 minutes

A half-hour to learn Zig

This is inspired by https://fasterthanli.me/blog/2020/a-half-hour-to-learn-rust/

Basics

the command zig run my_code.zig will compile and immediately run your Zig program. Each of these cells contains a zig program that you can try to run (some of them contain compile-time errors that you can comment out to play with)

@grippado
grippado / jsonview_dracula-theme.css
Last active February 19, 2025 16:51
JSONView Dracula Theme
/*
Dracula Theme CSS for JSONView
Link to chrome extension: https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc
Color Palette from https://github.com/dracula/dracula-theme
Made by https://github.com/grippado with 💜
*/
/*
To use this theme follow steps above:
1 - Install JSONView from link: https://chrome.google.com/webstore/detail/jsonview/chklaanhfefbnpoihckbnefhakgolnmc
@suissa
suissa / create.any.object.ts
Created May 24, 2019 10:45
Crie qualquer tipo de Objeto com TypeScript sem precisar definir PORRA NENHUMA DELE!
const obj = {[k: string]: any} = {}
// Discord all events!
// A quick and dirty fleshing out of the discord.js event listeners (not tested at all!)
// listed here -> https://discord.js.org/#/docs/main/stable/class/Client
// Learn from this, do not just copy it mofo!
//
// Saved to -> https://gist.github.com/koad/316b265a91d933fd1b62dddfcc3ff584
// Last Updated -> Halloween 2022
/*
@fabiobusnello
fabiobusnello / download.js
Last active June 14, 2018 16:59
downloads using fetch
export const download = async (params = {}) => {
const caching = await fetch(params.url, params)
const fileName = caching.headers.get('Content-Disposition')
const ext = fileName.split('.')[fileName.split('.').length - 1].replace('"', '')
const blob = await caching.blob()
const url = await URL.createObjectURL(blob)
const a = document.createElement("a");
a.href = url
a.download = `Reports.${ext}`
a.click()
@getify
getify / 1.md
Last active October 15, 2020 01:44
BetterPromise: a strawman experiment in subclassing Promise and "fixing" a bunch of its awkward/bad parts

Some things that are "better" with this BetterPromise implementation:

  • BetterPromise # then(..) accepts a BetterPromise (or Promise) instance passed directly, instead of requiring a function to return it, so that the promise is linked into the chain.

    var p = BetterPromise.resolve(42);
    
    var q = Promise.resolve(10);
    
    p.then(console.log).then(q).then(console.log);
@molcik
molcik / free-photoshop.md
Created May 18, 2018 08:39
Modify Photoshop to never ending trial

How Does It Work

All you have to do, to extend your trial period, is change number in TrialKey element in application.xml. This file is located in /Library/Application Support/Adobe/Adobe Photoshop/AMT. You can navigate there with this command:

cd /Library/Application\ Support/Adobe/Adobe\ Photoshop\ */AMT

Then you have to open the file and edit it. You can use just TextEdit app.

open -a TextEdit application.xml
@sheikhwaqas
sheikhwaqas / docker-compose.yml
Last active October 3, 2022 14:40
Docker Compose configuration to run MySQL 5.6 and MySQL 5.7 on one instance. Create /var/lib/mysql56-data & /var/lib/mysql57-data with root as the owner of these directories before running docker-compose up -d
version: '3'
services:
mysql56:
image: mysql:5.6
restart: unless-stopped
container_name: mysql56-container
ports:
- "127.0.0.1:3356:3306"
environment:
MYSQL_ROOT_PASSWORD: rootPassword
#!/bin/bash
set -e
CONTENTS=$(tesseract -c language_model_penalty_non_dict_word=0.8 --tessdata-dir /usr/local/share/tessdata/ "$1" stdout -l eng | xml esc)
hex=$((cat <<EOF
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">