Skip to content

Instantly share code, notes, and snippets.

View emekoi's full-sized avatar
📚

Emeka Nkurumeh emekoi

📚
View GitHub Profile
diff --git a/helix-core/src/lib.rs b/helix-core/src/lib.rs
index 09865ca40..556564491 100644
--- a/helix-core/src/lib.rs
+++ b/helix-core/src/lib.rs
@@ -62,7 +62,7 @@ pub mod unicode {
#[allow(deprecated)]
pub use position::{pos_at_visual_coords, visual_coords_at_pos};
-pub use selection::{Range, Selection};
+pub use selection::{Focus, Range, Selection};
#include <EGL/egl.h>
#include <EGL/eglext.h>
#include <GLES2/gl2.h>
#include <stdlib.h>
#include <string.h>
#include <wayland-client.h>
#include <wayland-egl.h>
#include "pointer-constraints-unstable-v1-client-protocol.h"
#include "xdg-shell-client-protocol.h"
@emekoi
emekoi / deploy-page.sh
Last active December 1, 2023 05:06
deploy a github pages website locally
#!/usr/bin/sh
set -e
[ -n "$BUILD_COMMAND" ]
head="$(git rev-parse --abbrev-ref HEAD)"
site_branch="${1:-gh-pages}"
build_dir="${2:-build}"
@emekoi
emekoi / m.c
Last active October 15, 2023 04:07
search upwards for a `Makefile` to run, or until any file called `.git` is found
/* SPDX-License-Identifier: MIT
* Copyright (c) 2023 Emeka Nkurumeh
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
data Extend x b r = Extend {-# UNPACK #-}b {-# UNPACK #-}r
deriving (Functor)
instance (KnownSymbol x, Show b, Show r) => Show (Extend x b r) where
show (Extend e r) = "{" ++ symbolVal @x undefined ++ " : " ++ show e ++ " | " ++ show r ++ "}"
instance {-# OVERLAPPING #-} HasField x (Extend x a r) a where
getField (Extend x _) = x
instance {-# OVERLAPPABLE #-} (HasField x r a) => HasField x (Extend x' a' r) a where
@emekoi
emekoi / rem.go
Last active August 9, 2023 18:11
martin rem's union find
type Rem struct {
arc []int
}
func NewRem(n int) *Rem {
a := make([]int, n)
for i := range a {
a[i] = i
}
return &Rem{
#!/usr/bin/sh
set -e
files="$(fd -e .el .)"
sd -s '^\\\\\\\\begin{code}' '^[\t ]*\```\s*haskell.*?' $files
sd -s '\\\\begin{code}' '```\s*haskell.*?' $files
sd -s '\\begin{code}' '```\s*haskell.*?' $files
sd -s '^\\\\\\\\end{code}' '^[\t ]*\```' $files
@emekoi
emekoi / android-backup-apk-and-datas.md
Created July 19, 2021 04:30 — forked from AnatomicJC/android-backup-apk-and-datas.md
Backup android app, data included, no root needed, with adb

Backup android app, data included, no root needed, with adb

adb is the Android CLI tool with which you can interact with your android device, from your PC

You must enable developer mode (tap 7 times on the build version in parameters) and install adb on your PC.

Fetch application APK

To get the list of your installed applications:

#include <stdio.h>
#include <stdlib.h>
void **evil(void **label) {
if (label) goto *label;
label0:
puts("hello from here");
return &&label1;
diff --git a/src/ui/statusbar.rs b/src/ui/statusbar.rs
index bd554c7..61ffd0a 100644
--- a/src/ui/statusbar.rs
+++ b/src/ui/statusbar.rs
@@ -143,7 +143,8 @@ impl View for StatusBar {
);
printer.with_color(style_bar_bg, |printer| {
- printer.print((0, 0), &"┉".repeat(printer.size.x));
+ printer.print((0, 0), &" ".repeat(printer.size.x));