Skip to content

Instantly share code, notes, and snippets.

@StephanHoyer
StephanHoyer / gist:bddccd9e159828867d2a
Last active March 29, 2022 11:46
Isomorphic applications with mithril

Attention

This post described how to create an application with mithril 0.2.x. Now that ver 1.0 is out, some things are a little differnent.

The example is updated with the current version of mithril, though.

Isomorphic applications with mithril

@adaptivegarage
adaptivegarage / theme-detect.css
Last active January 17, 2023 06:04
Pure CSS ePub theme detection (White / Sepia / Night) in iBooks (Mac OS and iOS included)
/*
Pure CSS ePub theme detection (White / Sepia / Night) in iBooks (Mac OS and iOS included)
Version 1.1
Note that iBooks actually uses internal JavaScript to set the "__ibooks_internal_theme" attribute on :root (html) element
every time the theme is changed, but this happens independently of whether your epub html markup is scripted or not.
Discovered and tested in iBooks on Mac, iPhone and iPad by
https://twitter.com/adaptivegarage
*/
@Anomitee
Anomitee / Multiple_PA_Streams.md
Last active March 4, 2022 22:09
Instructions on how to record multiple audio streams in SimpleScreenRecorder of only the applications you want such that they are separable when editing.

Suppose you want to record 3 things: your microphone, game and Mumble. With multiple audio stream support, you can record what's in the input tab of pavucontrol (which contains the mic channel, and a monitor of your computer's sounds). Problem is, as you stated, is that recording the monitor input will grab every application (not good, for example, if you want to keep Skype open to catch any calls but not record it). This also mashes together all the audio meaning you won't be able to edit the game audio and Mumble separately.

What you can do, is run the command pactl load-module module-null-sink sink_name=game_out This will create an output named "Null Output" in the output tab. Using pavucontrol, you can send the output of your game to the "Null Ouput", but you'll lose the sound. Running pactl load-module module-loopback source=app_out.monitor, however, will loop the Null Ouput back into the original output of the game, meaning you'll be able to hear your game again, but there will be a new input recor

@rcolinray
rcolinray / gl_ffmpeg.cpp
Created November 19, 2013 20:54
OpenGL-FFMpeg integration
// Use OpenGL 3.0+, but don't use GLU
#define GLFW_INCLUDE_GL3
#define GLFW_NO_GLU
#include <GL/glfw.h>
#include <glm/glm.hpp>
#include <glm/gtc/matrix_transform.hpp>
#include <glm/gtc/type_ptr.hpp>
extern "C" {
@plentz
plentz / nginx.conf
Last active April 24, 2024 11:15
Best nginx configuration for improved security(and performance)
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@mbostock
mbostock / .block
Last active March 10, 2019 08:11 — forked from mbostock/.block
The Sun’s View of the Earth
license: gpl-3.0
redirect: https://observablehq.com/@mbostock/the-suns-view-of-the-earth