Skip to content

Instantly share code, notes, and snippets.

View Meshiest's full-sized avatar
🍰

Isaac H Meshiest

🍰
View GitHub Profile
@Meshiest
Meshiest / quadtree.rb
Created February 18, 2016 20:16
An algorithm that simulates a quad tree to group similar values on a grid
def printTree tree
puts tree.map{|a|a.map{|b|(b[0] != 0 ? b[1] : '.')}.join}.join("\n")
end
def createTree str
# split up the grid and give node each value a scale of 1
# 2^(n-1) will represent dimension of a node, so scale 1 is size 1x1, 3 is 4x4..
grid = str.split("\n").map{|a|a.chars.map{|b|[1,b]}}
size = [grid.length, grid[0].length].max
// ==UserScript==
// @name Robin Triviacheat
// @namespace http://meshiest.com
// @version 4.1
// @description Cheat on trivia
// @author /u/meshiest
// @match https://www.reddit.com/robin*
// @grant none
// ==/UserScript==
'use strict';
table.md-table.md-row-select tbody.md-body > tr.md-row:not([disabled]):hover {
background-color: rgba(50,50,50, 0.1) !important;
}
table.md-table.md-row-select tbody.md-body > tr.md-row.md-selected {
background-color: rgba(50,50,50, 0.2) !important;
}
table.md-table td.md-cell {
font-size: 13px;
<md-table-container>
<table md-table md-row-select ng-model="selected">
<thead md-head md-order="myOrder">
<tr md-row>
<th md-column md-order-by='someAttribute'>Icon</th>
<th md-column>Foo</th>
<th md-column>URL</th>
</tr>
</thead>
<!-- you will have a theme for every single different type -->
package main
import (
"fmt"
"strings"
"net/http"
"io/ioutil"
"math/rand"
"time"
)
@Meshiest
Meshiest / blog.html
Created October 28, 2016 01:06
Automatically fetches blog posts from google blogger blogs (fill in blogId and apikey with respective ids)
<!DOCTYPE html>
<html>
<head>
<title>Test</title>
<script src='https://code.jquery.com/jquery-3.1.1.min.js'></script>
<style type="text/css">
* {
padding: 0;
margin: 0;
}
@Meshiest
Meshiest / style.css
Last active February 1, 2019 14:52
MyAnimeList Modern Template Theme
/*
Stylesheet for MyAnimeList.net profiles
Copyright (C) 2017 Meshiest
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
@Meshiest
Meshiest / .vimrc
Last active March 4, 2018 20:33
My VimPlug .vimrc
call plug#begin('~/.vim/plugged')
" Git magic
Plug 'airblade/vim-gitgutter'
" Rust Stuff
Plug 'rust-lang/rust.vim'
Plug 'racer-rust/vim-racer'
" File tree
@Meshiest
Meshiest / annoy.js
Created February 9, 2017 02:56
Groupme like bot annoyance
/*
* Paste in console (f12 or inspect element or ctrl-shift-c) while in a chat for maximum harassment
* People who sent the last 5 messages will get notifications constantly
*/
var j = 1;
function range(start, count) {
return Array.apply(0, Array(count))
.map(function (element, index) {
@Meshiest
Meshiest / screenshot.sh
Created June 2, 2017 15:52
Screenshot Area on KDE/arch
#!/bin/bash
# Requires spectacle and xclip, stores last screenshot at /tmp/screenshot.png
# Screenshots a specified area and copies the content to clipboard
# Author: Meshiest
rm /tmp/screenshot.png
spectacle -rbnwo /tmp/screenshot.png
[[ -f /tmp/screenshot.png ]] && xclip -selection c -t image/png -i /tmp/screenshot.png