Skip to content

Instantly share code, notes, and snippets.

View taskinoz's full-sized avatar

taskinoz

View GitHub Profile
@OrionReed
OrionReed / dom3d.js
Last active April 19, 2024 19:48
3D DOM viewer, copy-paste this into your console to visualise the DOM topographically.
// 3D Dom viewer, copy-paste this into your console to visualise the DOM as a stack of solid blocks.
// You can also minify and save it as a bookmarklet (https://www.freecodecamp.org/news/what-are-bookmarklets/)
(() => {
const SHOW_SIDES = false; // color sides of DOM nodes?
const COLOR_SURFACE = true; // color tops of DOM nodes?
const COLOR_RANDOM = false; // randomise color?
const COLOR_HUE = 190; // hue in HSL (https://hslpicker.com)
const MAX_ROTATION = 180; // set to 360 to rotate all the way round
const THICKNESS = 20; // thickness of layers
const DISTANCE = 10000; // ¯\\_(ツ)_/¯
@huytd
huytd / wordle.md
Last active March 17, 2024 20:51
Wordle in less than 50 lines of Bash

image

How to use:

./wordle.sh

Or try the unlimit mode:

@LambdAurora
LambdAurora / optifine_alternatives_fabric.md
Last active February 19, 2024 09:42
Recommended OptiFine alternatives on Fabric

The list is moving out!

If you share this list, please use this link instead: https://lambdaurora.dev/optifine_alternatives

It may still be only a redirection link, but it will have a better web display of the list soon. And the list being on GitHub/GitHub pages improves load times.

The gist version of this list will stop being updated.

Why?

@mikowl
mikowl / oneliners.js
Last active March 28, 2024 20:52
👑 Awesome one-liners you might find useful while coding.
// Inspired by https://twitter.com/coderitual/status/1112297299307384833 and https://tapajyoti-bose.medium.com/7-killer-one-liners-in-javascript-33db6798f5bf
// Remove any duplicates from an array of primitives.
const unique = [...new Set(arr)]
// Sleep in async functions. Use: await sleep(2000).
const sleep = (ms) => (new Promise(resolve => setTimeout(resolve, ms)));
// or
const sleep = util.promisify(setTimeout);
@munificent
munificent / generate.c
Last active March 18, 2024 08:31
A random dungeon generator that fits on a business card
#include <time.h> // Robert Nystrom
#include <stdio.h> // @munificentbob
#include <stdlib.h> // for Ginny
#define r return // 2008-2019
#define l(a, b, c, d) for (i y=a;y\
<b; y++) for (int x = c; x < d; x++)
typedef int i;const i H=40;const i W
=80;i m[40][80];i g(i x){r rand()%x;
}void cave(i s){i w=g(10)+5;i h=g(6)
+3;i t=g(W-w-2)+1;i u=g(H-h-2)+1;l(u
@dabroder
dabroder / i3-gaps.sh
Created June 6, 2018 14:21
Install i3-gaps on ubuntu 18.04
#!/bin/bash
sudo apt install -y libxcb1-dev libxcb-keysyms1-dev libpango1.0-dev libxcb-util0-dev libxcb-icccm4-dev libyajl-dev libstartup-notification0-dev libxcb-randr0-dev libev-dev libxcb-cursor-dev libxcb-xinerama0-dev libxcb-xkb-dev libxkbcommon-dev libxkbcommon-x11-dev autoconf libxcb-xrm0 libxcb-xrm-dev automake
cd /tmp
# clone the repository
git clone https://www.github.com/Airblader/i3 i3-gaps
cd i3-gaps
# compile & install

Demo

What demos are?

A file type (with the .dem extension) containing recorded events that can be edited and played back in-game. Demos can be edited to change camera angles, speed up, slow down, play music, and other functions. (from Valve wiki)

Benefits

  • You have your every game archived once enabled. Something nice happened to game? You can always get back to it!
  • It takes way less size than a video and about no system resources compared to its recording.
@freem
freem / twitter-killjunk.js
Last active December 28, 2022 22:22
disabling extraneous twitter features
/* NOTICE: THIS WAS MADE BACK IN 2017, OF COURSE IT'S NOT GOING TO WORK WELL NOW THAT TWITTER'S FUCKED THINGS UP */
@namespace url(http://www.w3.org/1999/xhtml);
@-moz-document domain("twitter.com") {
[data-component-context="suggest_recap"],
[data-component-context="suggest_who_to_follow"],
[data-component-context="suggest_activity"],
[data-component-context="suggest_activity_tweet"],
[data-component-context="suggest_recycled_tweet_inline"],
[data-component-context="suggest_recycled_tweet"]{
@Temzasse
Temzasse / Tabs.js
Created November 1, 2017 09:21
A React.js + styled-components Tabs component
import React, { Component } from 'react';
import PropTypes from 'prop-types';
import styled from 'styled-components';
import withRipple from './withRipple';
const TabContent = styled.div`
flex: 1;
width: 100%;
`;
@CodeMyUI
CodeMyUI / index.html
Created October 17, 2017 23:46
UI Motion – Shipping Concept
<!--
THIS IS ONE PART OF THREE
Check out the others here:
https://codepen.io/collection/DgggNa/
-->