Skip to content

Instantly share code, notes, and snippets.

View moaazsidat's full-sized avatar
👋

Moaaz Sidat moaazsidat

👋
View GitHub Profile
@moaazsidat
moaazsidat / eas.extended.ts
Created June 6, 2024 20:08
EAS SDK extension
import {
AttestationRequest,
EAS,
MultiAttestationRequest,
NO_EXPIRATION,
Offchain,
SchemaEncoder,
SchemaRegistry,
Transaction,
ZERO_ADDRESS,
"Break out" of a parent's containing width to take the full screen of a page w/this nice utility class:
```
.full-width {
width: 100vw;
position: relative;
left: 50%;
right: 50%;
margin-left: -50vw;
margin-right: -50vw;
Verifying my Blockstack ID is secured with the address 1H2RD8LttVTAjspKMWFZk3URfzBPJHzBRM https://explorer.blockstack.org/address/1H2RD8LttVTAjspKMWFZk3URfzBPJHzBRM
@moaazsidat
moaazsidat / rethinkdb_tls_guide.md
Created November 14, 2017 03:45
RethinkDB TLS Guide

RethinkDB with TLS

Thinker Lock

What You'll Need

To follow this guide, you will need Docker v1.10 or higher. Docker v1.10 has some volume and networking features that will come in handy for setting up a cluster. While this guide uses a single host with a cluster composed of several RethinkDB containers, the multi-host networking features of Docker can be used

0x5C7a843f6f308711567297906515E193a6F13a10

Update title for mp3 files

for f in *.mp3; do ffmpeg -i "$f" -metadata title="$f" "Fooled_by_Randomness_$f"; done

Append 0 to all filenames

for f in *.mp3; do mv "$f" "0$f"; done
@moaazsidat
moaazsidat / mp3title.sh
Created July 20, 2017 21:12
command to set mp3 title to file name
#!/bin/sh
FILES=*.mp3
for f in $FILES
do
echo "Processing ${f%.*}"
id3tag "--song=${f%.*} $f"
done
@moaazsidat
moaazsidat / split_mp3.md
Created July 20, 2017 19:19
Split mp3 audio files by duration

This worked for me when I tried it on a mp3 file.

$ ffmpeg -i somefile.mp3 -f segment -segment_time 3 -c copy out%03d.mp3 Where -segment_time is the amount of time you want per each file (in seconds).

References

Splitting an audio file into chunks of a specified length 4.22 segment, stream_segment, ssegment - ffmpeg documentation

@moaazsidat
moaazsidat / merge_pdfs_command_line.md
Last active September 9, 2023 16:45
merge pdfs command line
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf *.pdf

Try the good ghostscript:

gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf mine1.pdf mine2.pdf or even this way for an improved version for low resolution PDFs (thanks to Adriano for pointing this out):

@moaazsidat
moaazsidat / code_to_pages.md
Created May 20, 2017 23:07
Code to Pages (macOS)

1- Install highlight

brew install highlight

2- copy your file to your clipboard

highlight --syntax=YOURLANGUAGE -O rtf YOURFILE | pbcopy