Skip to content

Instantly share code, notes, and snippets.

@dtmrc
dtmrc / Growing A Discord Server.md
Created February 7, 2022 06:25 — forked from jagrosh/Growing A Discord Server.md
Tips for creating and growing a new Discord server

This guide is kept up-to-date as Discord and available resources change!
A basic server template is available here

Creating and Growing a Discord Server

logo

Introduction

Hello! I'm jagrosh#4824! I'm writing this guide to try to help new server owners set up and grow their servers, which is a commonly-requested topic. It's very easy to go about this the wrong way, so it's best to be prepared and make smart decisions so that your community can flourish!

Background

@dtmrc
dtmrc / Github Webhook Tutorial.md
Created February 7, 2022 06:11 — forked from jagrosh/Github Webhook Tutorial.md
Simple Github -> Discord webhook

Step 1 - Make a Discord Webhook

  1. Find the Discord channel in which you would like to send commits and other updates

  2. In the settings for that channel, find the Webhooks option and create a new webhook. Note: Do NOT give this URL out to the public. Anyone or service can post messages to this channel, without even needing to be in the server. Keep it safe! WebhookDiscord

Step 2 - Set up the webhook on Github

  1. Navigate to your repository on Github, and open the Settings Settings
@dtmrc
dtmrc / image.resize.in.github.flavored.markdown.md
Created February 5, 2022 20:25 — forked from uupaa/image.resize.in.github.flavored.markdown.md
image resize in github flavored markdown.

Image source

https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png

Try resize it!

  • ![](https://gyazo.com/eb5c5741b6a9a16c692170a41a49c858.png | width=100)
@dtmrc
dtmrc / fetch-timeout.js
Created February 5, 2022 20:13 — forked from davej/fetch-timeout.js
Add a pseudo timeout/deadline to a request using the ES6 fetch api
Promise.race([
fetch('/foo'),
new Promise((_, reject) =>
setTimeout(() => reject(new Error('Timeout')), 7000)
)
]);
@dtmrc
dtmrc / TrueColour.md
Created January 26, 2022 19:19 — forked from XVilka/TrueColour.md
True Colour (16 million colours) support in various terminal applications and terminals

Most updated version is always available at termstandard/colors repository.

Terminal Colors

There exists common confusion about terminal colors. This is what we have right now:

  • Plain ASCII
  • ANSI escape codes: 16 color codes with bold/italic and background
  • 256 color palette: 216 colors + 16 ANSI + 24 gray (colors are 24-bit)
  • 24-bit truecolor: "888" colors (aka 16 million)
@dtmrc
dtmrc / fix.sh
Created December 23, 2021 20:47 — forked from MatthewPierson/fix.sh
Fix for irecovery errors with PyBoot
#!/bin/bash
echo "Downloading and building libimobiledevice" # Just want to make sure theres no libimobiledevice related issues when installing libirecovery
brew install --HEAD libimobiledevice # This is just getting the latest libimobiledevice and building it instead of the older version that brew usually gets
brew link --overwrite libimobiledevice
echo "Downloading and building libirecovery"
mkdir -p build && cd build
@dtmrc
dtmrc / pwgen-bios-with-i.py
Created December 23, 2021 20:19 — forked from Rdp3389/pwgen-bios-with-i.py
generate result for HP serial with "i" error code
print("============================ Insyde H2O BIOS 'i'/'I' error-code ============================")
print("= Insyde H2O BIOS (Acer, HP) System Disabled 'i'/'I' error-code response generator.")
print("= this script meant to solve https://github.com/bacher09/pwgen-for-bios/issues/52 in Python 3")
print("= ")
print("= HP official response to BIOS Password reset: https://support.hp.com/us-en/document/c06368824")
print("============ Start Quote ============")
print("= A forgotten BIOS password cannot be reset by HP. HP is committed to the security and privacy of")
print("= our customers. To resolve a forgotten BIOS password issue, a system board replacement is required,")
print("= and additional customer costs apply. For more information, go to HP Worldwide Limited Warranty and Technical Support.")
print("= https://www8.hp.com/us/en/privacy/limited_warranty.html")
import * as bip32 from 'bip32';
import * as BufferLayout from 'buffer-layout';
import _ from 'lodash';
import nacl from 'tweetnacl';
import { Service } from 'typedi';
import {
Account, Connection, PublicKey, SystemProgram, SYSVAR_RENT_PUBKEY, Transaction,
TransactionInstruction
} from '@solana/web3.js';
// 1. prvi deo koda kopiras u konzolu na https://solanart.io/collections/solanaslugs
// - ako zelis vise slugova, moras da skrolujes dole da ih sve ucita
// zatim kopiraj ovaj code ga u konzolu:
const slugArray = Array.from(document.querySelectorAll('.card-title'))
const copy = slugArray.map(e => Number(e.outerText.split(" - ")[1]))
copy
// to sto ti izbaci kao rezultat, ides desni klik i "copy object"
const magicEdenURL = "https://api-mainnet.magiceden.io/rpc/getListedNFTsByQuery?q=%7B%22%24match%22%3A%7B%22collectionSymbol%22%3A%22essence_by_enigma_expanses%22%7D%2C%22%24sort%22%3A%7B%22takerAmount%22%3A1%2C%22createdAt%22%3A-1%7D%2C%22%24skip%22%3A0%2C%22%24limit%22%3A10%7D";
const exchangeURL = "https://api.exchange.art/v1/public/tokens?limit=10&sort=price-asc&from=0&filters=%7B%22tokenListingTypes%22:%5B%22listed%22,%22unlisted%22%5D,%22collections%22:%5B%22Essence%22%5D%7D&view=collection";
var XMLHttpRequest = require('xhr2');
function floorPiecesMagicEden() {
var http = new XMLHttpRequest();
http.open("GET", magicEdenURL);
http.send();
http.onreadystatechange = (e) => {