Skip to content

Instantly share code, notes, and snippets.

View asethwright's full-sized avatar

Seth Wright asethwright

View GitHub Profile
@asethwright
asethwright / flahopsitalsecure
Last active December 20, 2015 04:49
this should fix the https problem
$.getScript('https://www.swarminteractive.com/js/vm.js';, function(e) {
swarms.each(function(i) {
window.openthis = $(this).attr('id');
window.client = null;
window.width = null;
if (openthis.length) {
window.client = 4251;
window.width = $(this).width();
window.secure = true;
@asethwright
asethwright / vm-https
Created July 24, 2013 20:26
Basic ViewMedica HTTPS embed
<div id="vm"></div>
<script type="text/javascript" src="https://www.swarminteractive.com/js/vm.js"></script>
<script type="text/javascript">client="CLIENT_ID"; secure=true; width=580; vm_open();</script>
@asethwright
asethwright / vm-single-page-openthis
Last active December 21, 2015 13:08
Use a single ViewMedica embed and external links to open your ViewMedica player to custom locations.
Below are directions for embedding ViewMedica on a single page. You can then create links that will open that single embed to all of the animations in your personal ViewMedica library.
# 1. Create a page with the main ViewMedica embed
You can retrieve this information from your ViewMedica account at http://swarminteractive.com/vm/. After you log in click on the "Installation Support" tab. The code you want will look something like this:
------------------------------------------------------------------
<!-- ViewMedica Embed Start -->
<div id="vm"></div>
<script type="text/javascript" src="http://www.swarminteractive.com/js/vm.js"></script>
@asethwright
asethwright / vim-color-change
Created July 8, 2014 15:39
Vim Cursor Color Change in TMUX
" Cursor to yellow on insert mode
" Blue on command/other mode
" Note the use of hex codes (ie 3971ED)
if exists('$TMUX')
let &t_EI = "\<Esc>Ptmux;\<Esc>\033]Pl3971ED\033\\"
let &t_SI = "\<Esc>Ptmux;\<Esc>\033]PlFBA922\033\\"
silent !echo -ne "\<Esc>Ptmux;\<Esc>\033]Pl3971ED\033\\"
autocmd VimLeave * silent !echo -ne "\<Esc>Ptmux;\<Esc>\033]Pl3971ED\033\\"
else
let &t_EI = "\033]Pl3971ED\033\\"
@asethwright
asethwright / app.js
Created February 7, 2016 16:11
Example for scott
app.controller('BaseController', function() {
this.message = "Ready";
this.players = data;
//this.players.fieldGoalPercentage = this.players.fieldGoals / this.players.fieldGoalsAttempted;
//this doesn't work because this.players is an array of players
//so it's not assigning to everyone in the array
//if you wanted to use this method youd have to do a loop
// something like for(var i in this.players) { this.players[i].fieldGoalPercentage = ... }
@asethwright
asethwright / app.js
Created February 7, 2016 16:27
Example for Brittany
// Show and hide functions
this.moreInfo = function(playerLastName){
//toggles player details
this.showPlayerDetails = !this.showPlayerDetails;
this.playerLast = playerLastName;
console.log(playerLastName);
for (var i = 0; i < this.players.length; i++) {
// console.log(i);
if (playerLastName == this.players[i].last) {
@asethwright
asethwright / app.js
Created February 7, 2016 16:35
Example for Kiersten
var app = angular.module('basketball', []);
app.controller('BasketballController', function() {
console.log("success!");
});
let mapleader = ","
set smoothscroll
let scrollstep = 100
let barposition = "bottom"
map <Leader>r reloadTabUncached
map gb :buffer<Space>
map B :bookmarks! <Space>
map P :pintab<CR>
map p :unpintab<CR>