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 / WebhookConsole.sh
Last active August 16, 2017 03:38
Use a Discord webhook.
#!/bin/bash
echo -n "URL: "
read url
echo -n "Username: "
read name
echo -n "Image URL: "
read image
// ==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
// ==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==
@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
extern crate syscall;
use std::{
io::prelude::*,
mem,
net::TcpStream,
os::unix::io::AsRawFd,
slice
};
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;
}
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();
@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
rust = self.latest.rustChannels.stable;
buildRustPackage = self.rustPlatform.buildRustPackage.override {
cargo = rust.cargo;
rustc = rust.rust;
};
@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]}"