Skip to content

Instantly share code, notes, and snippets.

@scarca
scarca / QuickMacro.user.js
Last active July 13, 2016 00:28
A quick macro experience.
// ==UserScript==
// @name Quick Macro
// @namespace http://tampermonkey.net/
// @version 0.1.1
// @description Quick, JS-based macros.
// @author Raj Shrimali, rs@gatech.edu
// @match https://*/*
// @match http://*/*
// @grant none
// ==/UserScript==
@scarca
scarca / somefunction.java
Last active August 29, 2015 14:07
Java Stuff
final char [] VOWELS = {'a', 'e', 'i', 'o', 'u'};
public static ArrayList<Integer>[] findVowels(String toFind){
//Returns an array of arrayLists, so basically, each element is an arraylist, which has multiple (varying) elements
ArrayList<Integer>[] pos = new ArrayList<Integer[]>[VOWELS.length];
//For Every Vowel...
for(int c = 0; c < VOWELS.length; c++){
//Initialize some temporary variables
boolean lastFound;
int index;
@scarca
scarca / main.cpp
Created August 18, 2014 22:22
Stopwatch, Timer, and Clock
#include <iostream>
#include <string>
#include <chrono>
#include <thread>
#include <exception>
#include <cstdio>
using namespace std::chrono;
int timer(seconds);
int stopwatch();