Skip to content

Instantly share code, notes, and snippets.

View naftulikay's full-sized avatar
🌞

Naftuli Kay naftulikay

🌞
View GitHub Profile
@matzipan
matzipan / gala-wayland.md
Last active March 10, 2020 12:27
Getting Gala to run with Wayland

If you're interested in helping with this, join us on IRC: #elementary-dev on irc.freenode.net

Prerequisite: install the xwayland package.

I managed to get Gala to run in a VT with:

dbus-run-session -- gala --display-server --wayland

It even works with just gala --display-server --wayland, but the session still doesn't start.

@felixb
felixb / install-puppet-raspberry-pi.sh
Created July 23, 2014 11:01
installing puppet on a raspberry pi
#! /bin/sh
################################################################################
#
# install puppet on raspberry pi
# this is basically a copy of a blog post from runar balstad jensen
# http://stdout.no/puppet-on-raspberry-pi/
#
################################################################################
@mjuric
mjuric / DockerUserNamespacesOnCentOS74.md
Last active September 6, 2023 18:31
Setting up Docker with user namespaces on CentOS 7.4

Setting up Docker with user namespaces on CentOS 7.4

The procedure below has been tested on a Digital Ocean VM with CentOS 7.4

# Install docker from RHEL’s standard repos
yum install -y docker

#
# We’ll activate the ‘user namespaces’ feature that defends against
@marcan
marcan / linux.sh
Last active December 1, 2023 15:18
Linux kernel initialization, translated to bash
#!/boot/bzImage
# Linux kernel userspace initialization code, translated to bash
# (Minus floppy disk handling, because seriously, it's 2017.)
# Not 100% accurate, but gives you a good idea of how kernel init works
# GPLv2, Copyright 2017 Hector Martin <marcan@marcan.st>
# Based on Linux 4.10-rc2.
# Note: pretend chroot is a builtin and affects the current process
# Note: kernel actually uses major/minor device numbers instead of device name
@lu4nm3
lu4nm3 / main.rs
Last active January 16, 2024 09:38
Tokio Async: Concurrent vs Parallel
use futures::StreamExt;
use std::error::Error;
use tokio;
use tokio::macros::support::Pin;
use tokio::prelude::*;
use tokio::time::{Duration, Instant};
pub fn main() -> Result<(), Box<dyn std::error::Error>> {
let mut multi_threaded_runtime = tokio::runtime::Builder::new()
.threaded_scheduler()
@javanna
javanna / acpi_yogaX1_fedora28
Created July 15, 2018 19:02
S3 deep sleep for Lenovo yoga X1 3rd Generation on Fedora 28
This is a step-by-step guide on how make sleep mode work with a Lenovo Yoga X1 3rd generation running Fedora 28 (UEFI based system).
Kernel version: 4.17.4-200.fc28.x86_64
Credits: most of this guide comes from `https://delta-xi.net/#056`. The patch I used is a little different though, taken from http://kernel.dk/acpi.patch
(found through https://bbs.archlinux.org/viewtopic.php?pid=1794150#p1794150), and some of the steps slightly differ as well as mine is a UEFI based system.
1. Reboot, enter BIOS/UEFI. Go to Config - Thunderbolt (TM) 3 - set Thunderbolt BIOS Assist Mode to Enabled. Set also Security - Secure Boot to Disabled.
2. Install iasl (Intel's compiler/decompiler for ACPI machine language) and cpio: `sudo yum install acpica-tools cpio`
@XVilka
XVilka / TrueColour.md
Last active March 24, 2024 11:07
True Colour (16 million colours) support in various terminal applications and terminals

THIS GIST WAS MOVED TO TERMSTANDARD/COLORS REPOSITORY.

PLEASE ASK YOUR QUESTIONS OR ADD ANY SUGGESTIONS AS A REPOSITORY ISSUES OR PULL REQUESTS INSTEAD!

@OrionReed
OrionReed / DOM3D.js
Last active March 28, 2024 16:07
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; // ¯\\_(ツ)_/¯