Skip to content

Instantly share code, notes, and snippets.

View py7hon's full-sized avatar

Iqbal Rifai py7hon

View GitHub Profile
@Qix-
Qix- / sha256.sh
Last active February 15, 2025 07:24
SHA256 in (mostly) pure Bash script
#!/usr/bin/env bash
# Released into the Public Domain.
#
# Original implementation in C by Brad Conte ([email protected]) <https://github.com/B-Con/crypto-algorithms>
# Ported to Bash (lol) by Josh Junon ([email protected]) <https://github.com/qix->
#
# Yes, it's absolutely as slow as it looks.
#
# The only external dependency it has is on a utility called `od`,
@mrbar42
mrbar42 / README.md
Last active April 9, 2025 18:03
bash scripts to create VOD HLS stream with ffmpeg almighty (tested on Linux and OS X)

running:

bash create-vod-hls.sh beach.mkv

will produce:

    beach/
      |- playlist.m3u8
 |- 360p.m3u8
@ckabalan
ckabalan / best_bash_prompt.sh
Last active March 31, 2025 16:42
The Best Bash Prompt
# Bash History Replacement Script
# Author: Caesar Kabalan
# Last Modified: June 6th, 2017
# Description:
# Modifies the default Bash Shell prompt to be in the format of:
# [CWD:COUNT:BRANCH:VENV]
# [USER:HOSTNAME] _
# Where:
# CWD - Current working directory (green if last command returned 0, red otherwise)
# COUNT - Session command count
@NeuroWinter
NeuroWinter / ffmpeg cheatsheet for glitching
Last active April 29, 2025 01:28
ffmpeg cheatsheet for glitching
FFMPEG '-i', file, '-c:v', 'libopenjpeg', "jpeg2000\\" + name + ".jp2"\
Convert image to jpeg2000
ffmpeg -i in.png -c:v libopenjpeg out.jp2
Hex Edit out.jp2
ffmpeg -i in.jp2 -c:v png out.png
General Edit
ffmpeg -i input.avi -c:v mpeg2video -g 999 -q:v 1 output.avi
*edit in avidemux/whatever*
@izy521
izy521 / main.js
Last active November 12, 2021 06:14
Use CTRL + Enter to send a Discord Embedified message. You'll need to provide your account token to the code, on line 3. Will be removed if you refresh. Highlighting a selection of your message will let you send only that as the embed, and the rest as a normal message.
(function start_embed_generator(window, document) {
var my_token = "-YOUR_TOKEN_HERE-";
var color_reg = /(\#.+?)(\s|$)/;
var text_bar_color = "rgb(92, 156, 199)";
window.addEventListener('keydown' , handle_event);
window.addEventListener('keyup' , revert_bar );
return !console.log("Embed generator up!");

Direct copy of pre-encoded file:

$ ffmpeg -i filename.mp4 -codec: copy -start_number 0 -hls_time 10 -hls_list_size 0 -f hls filename.m3u8

@yasirkula
yasirkula / FileDownloader.cs
Last active April 21, 2025 13:34
C# Download Public File From Google Drive™ (works for large files as well)
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.IO;
using System.Net;
using System.Text;
/* EXAMPLE USAGE
FileDownloader fileDownloader = new FileDownloader();
@tzmartin
tzmartin / embedded-file-viewer.md
Last active April 16, 2025 14:36
Embedded File Viewer: Google Drive, OneDrive

Office Web Apps Viewer

('.ppt' '.pptx' '.doc', '.docx', '.xls', '.xlsx')

http://view.officeapps.live.com/op/view.aspx?src=[OFFICE_FILE_URL]

<iframe src='https://view.officeapps.live.com/op/embed.aspx?src=[OFFICE_FILE_URL]' width='px' height='px' frameborder='0'>
</iframe>

OneDrive Embed Links

// Unity C# Cheat Sheet
// I made these examples for students with prior exerience working with C# and Unity.
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting
@gist-master
gist-master / app.html
Last active May 10, 2019 12:56 — forked from adriatic/app.html
Progress Bar: events
<template>
<require from="./logger.js"></require>
<require from="aurelia-kendoui-bridge/progressbar/progressbar"></require>
<div id="example">
<div class="demo-section k-content">
<h4>ProgressBar</h4>
<div id="eventsProgressBar"
ak-progress-bar="k-min: 0;
k-max: 10;