Skip to content

Instantly share code, notes, and snippets.

View turbo's full-sized avatar

Pierre turbo

View GitHub Profile
float b=time,g,v,q;vec4 s(vec2 v){g=length(v);q=abs(sin((atan(v.g,v.r)-g+b)*9.)*.1)+.1;
return min(vec4(1.),vec4(.05/abs(q-g/3.),.04/abs(q-g/2.),.03/abs(q-g*.7),1.));}
float n(vec3 v){return 1.-dot(abs(v),vec3(0.,1.,0.))-length(s(v.rb).rgb)/2.*sin(b*2.)+
(sin(5.*(v.b+b))+sin(5.*(v.r+b)))*.1;}void main(){vec3 m=vec3(-1.+2.*(gl_FragCoord.rg/
vec2(1366.,768.)),1.),a=vec3(0.,0.,-2.);for(int r=0;r<55;r+=1)g=n(a+m*v),v+=g*.125;
gl_FragColor=vec4(v/2.)*s((v*m+a).rb)+v*.1*vec4(1.,2.,3.,4.)/2.*n(v*m+a);}
#define seconds * 1e3
#define bpm 60000 /
#define frames -1
#define GLExt(a) a(wglGetProcAddress(#a))
#define native(t) __declspec(dllimport) t __stdcall
#define MIDINote(hout, base, note, volume, channel) midiOutShortMsg(hout, 0x90 + ((base + note) * 0x100) + (volume * 0x10000) + channel)
// ## FRAMEWORK SETTINGS ##
//~ #define USEWIN // Use a window (not recommended)
#define seconds * 1e3
#define bpm 60000 /
#define GLExt(a) a(wglGetProcAddress(#a))
#define native(t) __declspec(dllimport) t __stdcall
#define MIDINote(hout, base, note, volume, channel) midiOutShortMsg(hout, 0x90 + ((base + note) * 0x100) + (volume * 0x10000) + channel)
// ## FRAMEWORK SETTINGS ##
//~ #define USEWIN // Use a window (not recommended)
#define MODERN_GLSL // One stop shader compiling
#include <windows.h>
#define seconds * 1e3
#define GLExt(a) a(wglGetProcAddress(#a))
#define native(t) __declspec(dllimport) t __stdcall
// ## FRAMEWORK SETTINGS ##
//~ #define USEWIN // Use a window (not recommended)
#define MODERN_GLSL // One stop shader compiling
#define REUSE // Turn on aggressive register reuse (can save dozens of bytes)
#include <windows.h>
#include <GL/gl.h>
#define XRES 1366
#define YRES 768
//~ #define USEWIN
#define GLExt(a) a(wglGetProcAddress(#a))
/* GitHub stylesheet for MarkdownPad (http://markdownpad.com) */
/* Author: Nicolas Hery - http://nicolashery.com */
/* Version: b13fe65ca28d2e568c6ed5d7f06581183df8f2ff */
/* Source: https://github.com/nicolahery/markdownpad-github */
/* RESET
=============================================================================*/
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
margin: 0;
@turbo
turbo / fingerprint.cs
Last active January 18, 2017 15:02
Hardware Fingerprint
public static string Value() {
if (string.IsNullOrEmpty(FingerPrint.fingerPrint)) {
object guid = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry32).OpenSubKey("SOFTWARE\\Microsoft\\Cryptography").GetValue("MachineGuid");
if (guid == null) {
guid = RegistryKey.OpenBaseKey(RegistryHive.LocalMachine, RegistryView.Registry64).OpenSubKey("SOFTWARE\\Microsoft\\Cryptography").GetValue("MachineGuid");
FingerPrint.fingerPrint = guid.ToString();
} else FingerPrint.fingerPrint = guid.ToString();
}
return FingerPrint.fingerPrint;
}
@turbo
turbo / ai.md
Last active December 19, 2016 16:17

One of the few root TLDs that sport a website is .ai, with OIS at ai. (http://ai./), a valid URL, yet refused by many validators (such as HN submit).

Not to be confused with www.* domains like com (http://www.com).

Some browsers may redirect ai (a local hostname) to ai.. Bevahior varies. Another glitch: ftp.TLD domains are valid and used, yet when entered into most browsers, they will change the protocol to ftp before even trying to access ftp.TLD over HTTP.

<svg><path fill="#fff" d="M63.4 23.7c2.2-.5 4.4-.4 6.6-.4 4.2 0 7 3.5 10 5.7 2.8-1.4 5.2-3.6 8-5.2 7-2.2 16.2 1.2 18.5 8.8 3 7 1.6 15 .7 22.3 5.7 11.2 6 25.5-1 36.3-5 8-15 12-24.2 12.2-9.2.3-19-2-25.4-9-6-6.2-7.8-15.2-7.3-23.5-.3-5.6 1.4-11 4-16-1.3-6-1.4-12-.8-18 .8-6 5-11.6 11-13.3M69 40.4c-3 .3-4.7 5.3-2.2 7.6 2.4 3.2 8 1.4 8.6-2.4.5-3.4-3-6.5-6.4-5.2m19 0c-3.7 1-4 6.6-1 8.5 3 2 7.7-.4 7.5-4 .4-3.5-3.5-5.8-6.5-4.7m-9.8 11C76 53 73.4 54 70.7 55c1.5 4 5 7.7 9.4 8.8 4.6-.7 8-4.8 9.6-9-3.3-1.2-6.5-2.7-9.6-4.3-.4.2-1.2.6-1.6 1z"/><g fill="#33485d"><path d="M46 25C56 8.8 78.3 2 95.7 9.6c13.4 5 23.2 18 24 32.4-.2 5.7 2.4 11 4 16.4 2 8.5 8 15 13 22 .8 1.4 1 3 1.4 4.6-4.7 2.7-10.7 2-15.3-.7-2.4 8.4-6.2 16.7-12.8 22.6-8 7.2-19 9.2-29.3 10h-1.2c-10.3-1-21.3-2.8-29-10.2C43.8 101 40 92.8 38 84.4c-4.8 2-11.4 4.2-15.7-.2 2.2-5.7 6.8-10 10-15.2 4-6.3 5.7-13.8 8-21 1-7.8 1.3-16 5.8-23m17.4-1.3c-6 1.7-10 7.3-11 13.3-.5 6-.4 12 1 18-2.7 5-4.4 10.4-4 16-.6 8.3 1.2 17.3 7.2 23.4 6.3 7 16.2 9.4 25.4 9 9.3-.2 19-4 24.3-12 7-11 6
Thank you for your interest in the unstatus project. This document clarifies the terms under which
you may make contributions — which may include without limitation, software, bug fixes, configuration
changes, documentation, or any other materials.
You accept and agree to the following terms and conditions for Your present and future Contributions
submitted to the project. Except for the license granted herein to the unstatus maintainer, You reserve
all right, title, and interest in and to Your Contributions. Remember to read the guidelines of creating
a COPYRIGHT file for your site.
Licenses