Skip to content

Instantly share code, notes, and snippets.

View EzioisAwesome56's full-sized avatar
💭
Probably sleeping

EzioisAwesome56

💭
Probably sleeping
  • The first 640k of RAM
View GitHub Profile
@EzioisAwesome56
EzioisAwesome56 / apt
Last active January 13, 2023 15:52
pacapt apt -> pacman syntax
#!/bin/bash
# apt syntax -> pacman wrapper
case "$1" in
"install")
pacman -S ${@:2}
;;
"remove")
@EzioisAwesome56
EzioisAwesome56 / byteSearch.java
Created September 17, 2021 14:07
search byte array for another byte array
static int bytesFindIndexOfQuery(byte[] bytes, byte[] query) {
int bytesLen = bytes.length;
int queryLen = query.length;
int limitLen = (bytesLen - queryLen) + 1;
outer: for (int i = 0; i < limitLen; i++) {
for (int ii = 0; ii < queryLen; ii++) {
if (bytes[i + ii] != query[ii]) {
continue outer;
}
}
@EzioisAwesome56
EzioisAwesome56 / downloads.php
Last active June 12, 2017 20:11 — forked from NightScript370/downloads.php
Downloads page for MMM
<?php $title = __("Downloads");
require(__DIR__.'/lib/common.php'); ?>
<style>
#myInput {
background-image: url('/css/searchicon.png'); /* Add a search icon to input */
background-color: white;
color: black;
background-position: 10px 12px; /* Position the search icon */
background-repeat: no-repeat; /* Do not repeat the icon image */