Skip to content

Instantly share code, notes, and snippets.

View LikeLakers2's full-sized avatar
💭
https://www.youtube.com/watch?v=PLj8XbvN35E

MichiRecRoom LikeLakers2

💭
https://www.youtube.com/watch?v=PLj8XbvN35E
View GitHub Profile
@TrueCP6
TrueCP6 / forge-to-fabric-ports.md
Last active January 29, 2024 16:09
A list of decently sized Forge mods ported or being ported to Fabric
@v--
v-- / pointer_arithmetic.d
Last active June 26, 2020 22:20
I saw a joke tweet some time ago about encoding natural numbers in levels of pointer indirection and doing arithmetic with them. This is different from what is usually called pointer arithmetic, however it is arithmetic and it involves pointers. I decided to implement addition and multiplication.
/+ dub.sdl:
name "pointer_arithmetic"
+/
import std.traits : isPointer, PointerTarget;
template IndirectionCounter(T)
{
static if (isPointer!T)
enum IndirectionCounter = 1 + IndirectionCounter!(PointerTarget!T);
@ritiek
ritiek / ffmpeg_stdin.py
Last active April 9, 2024 19:06
Using FFmpeg to read input via stdin in Python
# pip install pytube3
import pytube
import urllib.request
import subprocess
content = pytube.YouTube("https://www.youtube.com/watch?v=YQHsXMglC9A")
streams = content.streams.filter(only_audio=True).order_by("abr").desc()
response = urllib.request.urlopen(streams[0].url)
@nickkraakman
nickkraakman / ffmpeg-cheatsheet.md
Last active April 23, 2024 20:53
FFmpeg cheat sheet for 360 video

FFmpeg Cheat Sheet for 360º video

Brought to you by Headjack

 
FFmpeg is one of the most powerful tools for video transcoding and manipulation, but it's fairly complex and confusing to use. That's why I decided to create this cheat sheet which shows some of the most often used commands.

 
Let's start with some basics:

  • ffmpeg calls the FFmpeg application in the command line window, could also be the full path to the FFmpeg binary or .exe file
@polyjitter
polyjitter / embedshell.py
Last active November 4, 2018 23:30
A Python shell contained in an embed for Discord.
# Based off repl from RDanny by Danny.
# Will fail if the bot does not have embed permissions.
# Embed designed and implemented by taciturasa.
# Released under the MIT License.
#
# The MIT License (MIT)
#
# Copyright (c) 2015 Rapptz
#
# Permission is hereby granted, free of charge, to any person obtaining a
@chitchcock
chitchcock / 20111011_SteveYeggeGooglePlatformRant.md
Created October 12, 2011 15:53
Stevey's Google Platforms Rant

Stevey's Google Platforms Rant

I was at Amazon for about six and a half years, and now I've been at Google for that long. One thing that struck me immediately about the two companies -- an impression that has been reinforced almost daily -- is that Amazon does everything wrong, and Google does everything right. Sure, it's a sweeping generalization, but a surprisingly accurate one. It's pretty crazy. There are probably a hundred or even two hundred different ways you can compare the two companies, and Google is superior in all but three of them, if I recall correctly. I actually did a spreadsheet at one point but Legal wouldn't let me show it to anyone, even though recruiting loved it.

I mean, just to give you a very brief taste: Amazon's recruiting process is fundamentally flawed by having teams hire for themselves, so their hiring bar is incredibly inconsistent across teams, despite various efforts they've made to level it out. And their operations are a mess; they don't real

#!/user/bin/env ruby
require 'rubygems'
require 'wavefile'
require 'fftw3'
require 'fastercsv'
w = WaveFile.open('sample.wav')
samples = w.sample_data[0, [w.sample_rate * 10, w.sample_data.size].min]