Skip to content

Instantly share code, notes, and snippets.

View joshschmelzle's full-sized avatar
👻
༼ つ ◕_◕ ༽つ🛜

jsz joshschmelzle

👻
༼ つ ◕_◕ ༽つ🛜
View GitHub Profile
@joshschmelzle
joshschmelzle / TypeWriter.cs
Last active September 18, 2018 19:59
Typewriter effect for C# console - https://gfycat.com/ObeseFancyAvians
using System;
using System.IO;
using System.Text;
using System.Threading;
namespace LazyWriter
{
class TypeWriter : System.IO.TextWriter
{
private TextWriter originalOut;
@joshschmelzle
joshschmelzle / Stylebot.css
Last active March 31, 2016 12:46
simplynoise decluttered using stylebot
/* See before and after here: http://imgur.com/a/3HQML */
#bottomSection {
visibility: hidden;
display: none;
}
#topSection {
visibility: hidden;
display: none;
@joshschmelzle
joshschmelzle / Emoji Cheat Sheet
Created September 2, 2016 14:02
Use this cheat sheet for a shorthand emoji list
http://www.webpagefx.com/tools/emoji-cheat-sheet/
http://www.computerhope.com/keys.htm
@joshschmelzle
joshschmelzle / rewriting.md
Created October 12, 2016 15:50
Rewriting the default protocol for GitHub

git config --global url.https://github.com/.insteadOf git://github.com/

@joshschmelzle
joshschmelzle / spinner.js
Last active October 24, 2016 15:43
A simple spinner animation with JavaScript and HTML
var a = ["~", "/", "|", "\"];
// - : -
// ~ : ~
var asyncLoop = function(o) {
var i = -1;
var loop = function() {
i++;
@joshschmelzle
joshschmelzle / spinner.cs
Created October 24, 2016 15:42
A spinner animation in a win32 console
private void Spin()
{
Console.CursorVisible = false;
for (int i = 0; i < 3; i++)
{
originalOut.Write(@"~");
Console.SetCursorPosition(Console.CursorLeft - 1, Console.CursorTop);
originalOut.Write(@"\");
Console.SetCursorPosition(Console.CursorLeft - 1, Console.CursorTop);
@joshschmelzle
joshschmelzle / localhost-ping-timestamp.bat
Created November 3, 2016 18:33
win32 ping with timestamp. to use from the command line replace %%a with %a - found hre: http://stackoverflow.com/questions/24906268/ping-with-timestamp
@echo off
ping -t localhost|cmd /q /v /c "(pause&pause)>nul & for /l %%a in () do (set /p "data=" && echo(!time! !data!)&ping -n 2 localhost>nul"
@joshschmelzle
joshschmelzle / ffmpeg-merge-two-videos.md
Last active December 25, 2022 09:06
Merging two video clips into one and placing them next to each other with ffmpeg

Taking two video clips, placing them side by side, combining 4 channels of audio into 2, and output.

ffmpeg -i video1.MP4 -i video2.mp4 -filter_complex "[0:v][1:v]hstack=inputs=2[v]; [0:a][1:a]amerge[a]" -map "[v]" -map "[a]" -ac 2 output.mp4

This was done with two filters and the audio from both inputs.

  • hstack places each video side-by-side.
  • amerge combines the audio from both inputs into a single, multi-channel audio stream, and -ac 2 will make it stereo (without this option the audio stream may end up as 4 channels if both inputs are stereo.)
@joshschmelzle
joshschmelzle / ffmpeg-cut-out-video.cmd
Created November 29, 2016 18:17
Cut a video without re-encoding with ffmpeg
ffmpeg -i input.mp4 -c copy -ss 00:04:25.000 -to 00:09:25.000 output.mp4