This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef RANGE_HPP_ | |
#define RANGE_HPP_ | |
template<typename T> class RangeIterator; | |
template<typename T> | |
class Range | |
{ | |
T _start, _end, _step; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#pragma once | |
// openvr.h | |
//========= Copyright Valve Corporation ============// | |
// Dynamically generated file. Do not modify this file directly. | |
#ifndef _OPENVR_API | |
#define _OPENVR_API | |
#include <stdint.h> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#! python3 | |
import shlex | |
import sys | |
import re | |
import io | |
header = open('openvr.h', newline='\n').read() | |
annoyingMacroPattern = re.compile(r'#define\s+(\w+).*VR_CLANG_ATTR.*') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#this function replaces an existing index with a new one. | |
def replace_item(inventory,new_item): | |
for i,item in enumerate(inventory): | |
if item != new_item: | |
inventory[i] = new_item | |
return inventory | |
my_inv = [0]*26 | |
sword = "sword" | |
bow = "bow" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def replace_item(inventory, item): | |
for item in range( len(list) ): | |
if item != new_item: | |
list[item] = new_item | |
return list | |
inventory = range(26) | |
new_item = "" | |
print replace_item(inventory, new_item) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# ruby script to create a directory structure from indented data. | |
# Three ways to use it: | |
# - Pipe indented (tabs or 2 spaces) text to the script | |
# - e.g. `cat "mytemplate" | planter.rb | |
# - Create template.tpl files in ~/.planter and call them by their base name | |
# - e.g. Create a text file in ~/.planter/site.tpl | |
# - `planter.rb site` | |
# - Call planter.rb without input and it will open your $EDITOR to create the tree on the fly | |
# You can put %%X%% variables into templates, where X is a number that corresponds to the index |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
dir=$(dirname $0) | |
gconfdir=/apps/gnome-terminal/profiles | |
echo # This makes the prompts easier to follow (as do other random echos below) | |
######################## | |
### Select a profile ### | |
######################## |