Skip to content

Instantly share code, notes, and snippets.

View legomushroom's full-sized avatar
🇺🇦
stop russizm

Oleg Solomko legomushroom

🇺🇦
stop russizm
View GitHub Profile
@glslioadmin
glslioadmin / TEMPLATE.glsl
Last active July 5, 2019 00:55
GLSL.io Transition (v1)
#ifdef GL_ES
precision highp float;
#endif
uniform sampler2D from, to;
uniform float progress;
uniform vec2 resolution;
void main() {
vec2 p = gl_FragCoord.xy / resolution.xy;
gl_FragColor = mix(texture2D(from, p), texture2D(to, p), progress);
@hdragomir
hdragomir / sm-annotated.html
Last active March 5, 2024 08:57
The deferred font loading logic for Smashing Magazine. http://www.smashingmagazine.com/
<script type="text/javascript">
(function () {
"use strict";
// once cached, the css file is stored on the client forever unless
// the URL below is changed. Any change will invalidate the cache
var css_href = './index_files/web-fonts.css';
// a simple event handler wrapper
function on(el, ev, callback) {
if (el.addEventListener) {
el.addEventListener(ev, callback, false);
@staltz
staltz / introrx.md
Last active June 6, 2024 03:19
The introduction to Reactive Programming you've been missing
@nongio-zz
nongio-zz / node-term-tools.md
Last active November 13, 2017 17:23
nodejs terminal UI tools

nodejs terminal UI tools

Inquirer A collection of common interactive command line user interfaces. Used by yeoman

terminal-menu used in rvagg/workshopper learnyounode...

cli-color used in rvagg/workshopper learnyounode...

blessed A curses-like library for node.js.

@archerslaw
archerslaw / solve the "no network with matching name 'default'" problem.
Last active March 7, 2023 06:01
solve the "no network with matching name 'default'" problem.
# virsh create rhel7.xml
error: Failed to create domain from rhel7.xml
error: Network not found: no network with matching name 'default'
# virsh net-list --all
Name State Autostart Persistent
----------------------------------------------------------
default active no yes
# virsh net-define /dev/stdin <<EOF
/*
* Date Format 1.2.3
* (c) 2007-2009 Steven Levithan <stevenlevithan.com>
* MIT license
*
* Includes enhancements by Scott Trenda <scott.trenda.net>
* and Kris Kowal <cixar.com/~kris.kowal/>
*
* Accepts a date, a mask, or a date and a mask.
* Returns a formatted version of the given date.
@amoilanen
amoilanen / promisify_require.js
Last active April 1, 2021 13:54
Enhances 'require' from RequireJS with Promises API while preserving its original semantics. Now 'require' calls can be chained.
/*
* Enhances 'require' from RequireJS with Promises API while preserving its original semantics.
*/
(function() {
if (!Promise || !require) {
return;
}
#!/usr/bin/env xcrun swift
import Foundation
let kDelayUSec : useconds_t = 500_000
func DragMouse(from p0: CGPoint, to p1: CGPoint) {
let mouseDown = CGEventCreateMouseEvent(nil, .LeftMouseDown, p0, .Left)
let mouseDrag = CGEventCreateMouseEvent(nil, .LeftMouseDragged, p1, .Left)
let mouseUp = CGEventCreateMouseEvent(nil, .LeftMouseUp, p1, .Left)
@getify
getify / gist:1b26accb1a09aa53ad25
Last active April 20, 2024 11:35
first draft sketch of a "Worker" polyfill
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Worker Polyfill</title>
<script src="polyfill.worker.js"></script>
</head>
<body>
<h1>Worker Polyfill</h1>
<script>