Skip to content

Instantly share code, notes, and snippets.

function! SplitTargets()
let tp = findfile("TARGETS", ".;")
if tp == ""
echo "TARGETS Not Found"
else
exe "split " . tp
endif
endfunction
@brandonio21
brandonio21 / f2w.py
Last active March 11, 2018 21:41
Convert simple python for loops to while loops
"""
Super simple script to convert for loops to while loops
Usage:
$ python f2w.py
for i in [1,2,3]:
print(i)
^D
__i = 0
while __i < len([1,2,3]):
import hashlib
import time
def files_are_equal(contents1, contents2):
for b1, b2 in zip(contents1, contents2):
if b1 != b2:
return False
return True
import time
import sys
border = '+---------------------------------+'
sides = '| |'
stretching_msg = 'Is this haunted room actually stretching?'
imag_msg = ' Or is it just your imagination?'
stretchrange = 20

Keybase proof

I hereby claim:

  • I am brandonio21 on github.
  • I am brandonio21 (https://keybase.io/brandonio21) on keybase.
  • I have a public key ASAPufGJnhHvnCDNpJIGbdQbJJGuHikFRLCmLVuQM7u-ago

To claim this, I am signing this object:

Hello
gist-vim test
@brandonio21
brandonio21 / rust_fib
Created May 23, 2015 03:21
Fibonnacci in Rust
use std::io;
fn main() {
loop {
println!("Enter the term that you want to generate!");
let mut term = String::new();
io::stdin().read_line(&mut term)
.ok()
.expect("Failed to read line!");
@brandonio21
brandonio21 / main.rs
Created May 20, 2015 01:58
Rustic-Tac-Toe
extern crate rand;
use std::io;
use rand::Rng;
fn main() {
let zero_ascii = 48;
let default_char = '-';
let last_turn = 5;
angular.module('recipr', [])
.controller('IngredientListController', function() {
var ingredientList = this;
ingredientList.ingredients = [
{text:'5oz of oregano'},
{text:'3oz of thyme'}];
ingredientList.addIngredient = function() {
ingredientList.ingredients.push({text:ingredientList.ingredientText});
ingredientList.ingredientText = '';
@brandonio21
brandonio21 / Update.netTest
Last active August 29, 2015 14:03
Update.NET Tester Program
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace update.netTester
{
class Program
{