Skip to content

Instantly share code, notes, and snippets.

View gastrodon's full-sized avatar
🙀
holy fucking bingle. what?! :3

Eva gastrodon

🙀
holy fucking bingle. what?! :3
View GitHub Profile
GET /queues

GET a list of queues, with some information about them queues returned are ordered firstly by creation time, secondly by UUID

@gastrodon
gastrodon / README.md
Last active September 22, 2020 06:41
Ataxx

Ataxx

This is a tool that understands the board game Ataxx, and generates moves for it based on a board. Before using the tool, make it (and other included scripts, see below) executable

$ chmod +x main.py board.py play

The input should have separated by newlines a height, width, playing token, and rows of the board. For example:\

import argparse, os, re, json
def get_args():
parser = argparse.ArgumentParser()
parser.add_argument("-r", "--recurse", action = "store_true", help = "look recursively through source dirs")
parser.add_argument("-a", "--append", action = "store_true", help = "append contents to the outfile")
parser.add_argument("-v", "--value-spacing", action = "store_true", help = "put spaces around the value delimiter")
parser.add_argument("-o", "--out", type = str, default = "", help = "Writable destination. Writes to stdout if none")
parser.add_argument("-p", "--pattern", type = str, default = ".+", help = "Regex pattern to filter files by. Default is .+")
parser.add_argument("-d", "--dir-pattern", type = str, default = "^(?!.git).*$", help = "Regex pattern to filter dirs by. Default is ^(?!.git).*$ (ignores .git)")
@gastrodon
gastrodon / bf.c
Last active November 17, 2019 08:36
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
#define U_SMALL 65535
char *get_source(char *filename) {
FILE *source = fopen(filename, "r");
if (source == NULL) {

Walmart seems to use a few primary API's. No idea why. They are

  • https://walmart.com/
  • http://mobile.walmart.com/
  • http://quimby.mobile.walmart.com/

Searching for items by keyword

If you're looking for the price of some item, you can start with the search API.

@gastrodon
gastrodon / printing-pattern.c
Last active April 12, 2019 03:14
Accepts input n, outputs a grid of n surrounding n-1 ... surrounding n = 1
#include <stdio.h>
int main(int argc, char *argv[]) {
int input, lowest, radius, index, flag;
input = (int) *argv[1] - 48;
flag = 1;
radius = input - 1;
index = 0;
while(1) {
lowest = input - index;
@gastrodon
gastrodon / change.c
Last active December 31, 2018 22:44
Script to make change in c
#include <stdio.h>
#include <stdlib.h>
/*
call format:
./name price tender
output format:
list of denominations and their count
*/
@gastrodon
gastrodon / zagnoster.zsh-theme
Last active September 22, 2020 01:04
Zagnoster
# vim:ft=zsh ts=2 sw=2 sts=2
#
# agnoster's Theme - https://gist.github.com/3712874
# A Powerline-inspired theme for ZSH
#
# # README
#
# In order for this theme to render correctly, you will need a
# [Powerline-patched font](https://gist.github.com/1595572).
#