Skip to content

Instantly share code, notes, and snippets.

@ap0ught
ap0ught / CircularMenu.cs
Created June 6, 2019 20:15 — forked from KenneyNL/CircularMenu.cs
Circular menu sample code for Unity
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CircularMenu : MonoBehaviour{
public float radius = 100.0f;
public float offset = 0.0f;
void Start(){
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@ap0ught
ap0ught / tictactoe.cpp
Created July 10, 2017 21:00 — forked from a12x/tictactoe.cpp
tic tac toe
#include <iostream>
#include <iomanip>
#define BINARY(x) 0b##x
const short UPPER_LEFT = BINARY(100000000);
const short FULL_BOARD = BINARY(111111111);
const short HORIZ_0 = BINARY(111000000);
@ap0ught
ap0ught / ants.pde
Created July 10, 2017 18:35 — forked from arctangent/ants.pde
Ant Colony Simulation in Processing
// Ant Foraging Simulator
// Jacob Conrad Martin
// http://jacobconradmartin.com
import processing.video.*;
MovieMaker mm;
// *** CONFIG ***
int worldWidth = 400;
@ap0ught
ap0ught / PiDay.cs
Created March 16, 2017 17:47 — forked from ThirdPartyNinjas/PiDay.cs
Calculating Pi from random numbers
using System;
namespace PiDay
{
// The probability of two random numbers to be coprime is P = 6 / Pi^2
// So let's generate a bunch of random numbers. Figure out how often they're coprime.
// Use that percentage as our probabilty and solve for Pi.
// Pi = sqrt(6 / P)
// For more info, watch the video where I stole the idea: https://youtu.be/RZBhSi_PwHU
@ap0ught
ap0ught / main_out.js
Last active August 29, 2015 14:21 — forked from edolganov/main_out.js
//replace http://agar.io/main_out.js by this file
//with Fiddler Web Debugger (AutoResponder tab)
//bots can be created in different rooms - so try restart the page if need
var totalBotCount = 0;
function game(h, r, bot, botUrl, botName) {
require "csv"
require 'action_controller/test_process'
file = `ls upload/*.csv | grep -v and-r`.chomp
info = CSV.read(ARGV.first || file)
info.shift
# TODO: set this list by eliminating the expected cols
properties = %w[Colour Material Size Weight Warranty] + ["Pole Diameter", "Fits Pole Size"]