Skip to content

Instantly share code, notes, and snippets.

View jD91mZM2's full-sized avatar
I'm melting

jD91mZM2 jD91mZM2

I'm melting
View GitHub Profile
@jD91mZM2
jD91mZM2 / frankenwm.c.diff
Created May 31, 2020 14:23
workspace names - frankenwm
diff --git a/frankenwm.c b/frankenwm.c
index 0bc3329..2bb2f08 100644
--- a/frankenwm.c
+++ b/frankenwm.c
@@ -2859,6 +2859,7 @@ int setup(int default_screen)
xcb_atom_t net_atoms[] = { ewmh->_NET_SUPPORTED,
#ifdef EWMH_TASKBAR
ewmh->_NET_CLIENT_LIST,
+ ewmh->_NET_DESKTOP_NAMES,
ewmh->_NET_WM_STRUT,
@jD91mZM2
jD91mZM2 / monitorshot2.sh
Last active May 10, 2020 13:25 — forked from naelstrof/monitorshot2.sh
Just screenshots the monitor that the mouse is on.
monitors="$(xrandr | grep -o '[0-9]*x[0-9]*[+-][0-9]*[+-][0-9]*')"
# Get the location of the mouse
eval "$(xdotool getmouselocation --shell --prefix mouse_)"
while read -r line; do
if [[ "$line" =~ ([0-9]+)x([0-9]+)([+-][0-9]+)([+-][0-9]+) ]]; then
specs="${BASH_REMATCH[0]}"
width="${BASH_REMATCH[1]}"
height="${BASH_REMATCH[2]}"
x="${BASH_REMATCH[3]}"
rust = self.latest.rustChannels.stable;
buildRustPackage = self.rustPlatform.buildRustPackage.override {
cargo = rust.cargo;
rustc = rust.rust;
};
@jD91mZM2
jD91mZM2 / interesting-caesars
Last active September 21, 2018 13:40
Interesting caesar ciphers, generated by https://gitlab.com/jD91mZM2/find-caesar
abjurer +13 = nowhere
Acts -08 = sulk
acts -08 = sulk
Adas +08 = ilia
adder +01 = beefs
adds +01 = beet
Aden +10 = Knox
advt +11 = loge
ahem +07 = Holt
ails +06 = gory
use std::{
io::prelude::*,
os::unix::net::{UnixListener, UnixStream},
thread
};
fn main() {
let server = UnixListener::bind("/tmp/uds-demo").unwrap();
thread::spawn(move || {
let (mut stream, _addr) = server.accept().unwrap();
import java.util.ArrayList;
public class Main {
public static void main(String[] args) {
System.out.println(answer(new int[] {1, 1, 1}));
System.out.println(answer(new int[] {1, 2, 3, 4, 5, 6}));
int[] array = new int[2000];
for (int i = 0; i < array.length; i += 1) {
array[i] = i % 6 + 1;
}
extern crate syscall;
use std::{
io::prelude::*,
mem,
net::TcpStream,
os::unix::io::AsRawFd,
slice
};
@jD91mZM2
jD91mZM2 / zoneinfo.zip
Created February 25, 2018 06:29
List of zone info files on my system ($GOROOT/lib/time/zoneinfo.zip)
Africa/Abidjan
Africa/Accra
Africa/Addis_Ababa
Africa/Algiers
Africa/Asmara
Africa/Asmera
Africa/Bamako
Africa/Bangui
Africa/Banjul
Africa/Bissau
// ==UserScript==
// @name Find replace!
// @namespace http://tampermonkey.net/
// @version 0.1
// @description tbodt's idea, but executed poorly
// @author You
// @match http://*/*
// @match https://*/*
// @grant none
// ==/UserScript==
// ==UserScript==
// @name Search -> Discord
// @version 0.2.1
// @author tbodt, improved by jD91mZM2
// @match https://www.google.se/*
// @match https://www.google.com/*
// @match https://www.google.ee/*
// @grant GM_xmlhttpRequest
// @require https://code.jquery.com/jquery-3.2.0.min.js
// @require https://gist.github.com/raw/2625891/waitForKeyElements.js