Skip to content

Instantly share code, notes, and snippets.

:shipit:
memes

Franc[e]sco Francesco149

:shipit:
memes
Block or report user

Report or block Francesco149

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@Francesco149
Francesco149 / march.v
Last active Jun 22, 2019
vlang playground raymarcher in <1000 characters. paste this in https://vlang.io/play and run, it renders a shaded sphere. relies on an early version of vlang and quirks with autoformat, might break pretty soon
View march.v
const(W=25 H=11 E=0.001 F=100.0 C=['-','.',' '])
fn q(n f64)f64{mut x:=n mut y:=1.0 for x-y>E{x=(x+y)/2 y=n/x}return x}
struct V{mut: x f64 y f64 z f64}
fn (v V)a(o V)V{return V{x:v.x+o.x,y:v.y+o.y,z:v.z+o.z}}
fn (v V)m(s f64)V{return V{x:v.x*s,y:v.y*s,z:v.z*s}}
fn (v V)g()f64{return q(v.x*v.x+v.y*v.y+v.z*v.z)}
fn (v V)n()V{m:=v.g() if m<E{return v} return V{x:v.x/m,y:v.y/m,z:v.z/m}}
fn s(p V)f64{d:=p.g()-0.1 if d<-p.y+0.2{return d}return -p.y+0.2}
fn h(e,r V)f64{mut t:=0.0 for i:= 0;i<99;i++{d:=s(e.a(r.m(t))) if d<E{return t} t+=d if t>=F{break}}return -1}
fn f(u,v f64)string{e:=V{x:0,y:0,z:-1} r:=V{x:u,y:v,z:1} d:=h(e,r.n())
@Francesco149
Francesco149 / _buttery_smooth_vte_with_120fps_patch.md
Last active Apr 2, 2019
buttery smooth vte/libvte with the 120fps patches
View _buttery_smooth_vte_with_120fps_patch.md

buttery smooth vte/libvte with the 120fps patches

vte/libvte is extremely choppy because it's hard-capped to 40fps. all terminals based on it suffer from this, so I decided to make these quick n dirty patches for various vte versions that bump the cap up to 120fps

here's a 120fps video demostration https://streamable.com/j8i0n

also a 60fps clip on twitter if your browser can't handle 120 https://twitter.com/roriicon/status/1113186464332951559

View godrays.glsl
vec4 godrays(float density, float weight, float decay, float exposure,
int numSamples, sampler2D occlusionTexture, vec2 sunPositionScreenSpace,
vec2 uv)
{
vec4 color = vec4(0.0);
vec2 delta = (sunPositionScreenSpace - uv) / float(numSamples) * density;
float intensity = 1.0;
for (int i = 0; i < 1337; ++i) {
if (i >= numSamples) break;
uv += delta;
View uwp-template.log
[uwpspy.cpp:57] log_init: initialized console
[uwpspy.cpp:246] spy_exports: :: api-ms-win-core-winrt-l1-1-0.dll
[uwpspy.cpp:263] spy_exports: 00007FFF95413630 -> RoActivateInstance @450
[uwpspy.cpp:263] spy_exports: 00007FFF95408620 -> RoGetActivationFactory @456
[uwpspy.cpp:263] spy_exports: 00007FFF9546A0F0 -> RoGetApartmentIdentifier @458
[uwpspy.cpp:263] spy_exports: 00007FFF954A1EC0 -> RoInitialize @463
[uwpspy.cpp:263] spy_exports: 00007FFF9549F070 -> RoRegisterActivationFactories @470
[uwpspy.cpp:263] spy_exports: 00007FFF954A3C70 -> RoRegisterForApartmentShutdown @471
[uwpspy.cpp:263] spy_exports: 00007FFF95494DE0 -> RoRevokeActivationFactories @476
[uwpspy.cpp:263] spy_exports: 00007FFF954A4E10 -> RoUninitialize @480
View __set.bat
set "QUTEBROWSER_PATH=%~dp0qutebrowser.exe"
set "QUTEBROWSER_ICON=\"%QUTEBROWSER_PATH%\",0"
set "QUTEBROWSER_ARGS=\"%QUTEBROWSER_PATH%\" \"%%1\""
if not exist "%QUTEBROWSER_PATH%" (
echo ERROR: "qutebrowser.exe" not found.
) else (
View f.py
#!/usr/bin/env python
'''
utils to pack and unpack single-precision floats in IEEE 754
I wrote this to get used to bit twiddling with IEEE
this is free and unencumbered software released into the public domain
'''
@Francesco149
Francesco149 / building-qtwebengine-on-windows.md
Last active Mar 19, 2019
how to build qtwebengine and qutebrowser on windows with proprietary codecs
View building-qtwebengine-on-windows.md

quick n dirty notes so I don't forget

choco install -y strawberryperl gperf visualcpp-build-tools windows-sdk-10.0

@Francesco149
Francesco149 / docker-cross-device-link.md
Last active Jun 19, 2019
docker error creating new backup file '/var/lib/dpkg/status-old': Invalid cross-device link
View docker-cross-device-link.md
@Francesco149
Francesco149 / set-up-xcodegen-signing-personal-team.md
Last active Oct 15, 2018
how to set up iOS code signing with a personal free provisioning team with xcodegen
View set-up-xcodegen-signing-personal-team.md

I recently wrestled with the clusterfuck that is iOS code signing, so here's my setup to set up a swift xcodegen project signed with a personal (free) provisioning team. this doesn't require an apple developer account, just a regular apple id.

you'll be able to build whole thing from the command line without ever have to touch xcode ever again.

this was tested with xcode 10.0 (10A255) on High Sierra

View commands-for-sakurafrost225.md

shigebot 2.1

by Franc[e]sco/lolisamurai

Available commands for channel #sakurafrost225 (+ = mod only):

  • +!cmdadd command_name command_text
  • +!cmdremove command_name
  • +!cmdedit command_name new_command_text
  • +!modonly command_name yes/no
You can’t perform that action at this time.