Skip to content

Instantly share code, notes, and snippets.

@christianvuerings
christianvuerings / enable-autocomplete.js
Created January 29, 2014 18:23
Enable autocomplete
var inputs = document.querySelectorAll('input');
for (var i = 0; i < inputs.length; i++) { inputs[i].setAttribute('autocomplete', 'on') };
@christianvuerings
christianvuerings / standups.json
Last active August 29, 2015 13:57
CalCentral stand-up times
{
"standups": {
"20140317": {
"time": "22"
},
"20140318": {
"time": "20"
},
"20140319": {
"time": "32"
@christianvuerings
christianvuerings / angular-rails-templates-images.markdown
Created June 16, 2014 17:30
Moving to app/assets/templates doesn't render the .erb file correctly

Before

app/views/templates/404.html.erb

<%= image_tag "glass_magnifying_200x175.jpg", :size => "200x175", :alt => "", :class => "cc-right" %>

After

Steps

  • Move assets to /src
  • Fix rails_admin custom stylesheets (app/assets/stylesheets/rails_admin)
  • Copy package.json
  • Copy gulpfile.js
  • Controllers
    • Copy calcentral_config_controller.rb (app/controllers/calcentral_config_controller.rb)
    • Bootstrapcontroller
  • update index method
@christianvuerings
christianvuerings / sis-advising-alpha.css
Last active August 29, 2015 14:15
SIS Project - advising appointment prototype
.uc-prototype {
color: #474747;
margin: 0;
font-family: Arial,sans-serif;
font-size: 13px;
font-weight: 400;
line-height: 1.5;
padding: 20px;
}
/* Hide Hacks */
@christianvuerings
christianvuerings / awards.json
Created April 21, 2015 20:52
SIS Prototype Finaid
{
"terms": [
{
"startTerm": "Fall",
"startTermYear": "2014",
"endTerm": "Spring",
"endTermYear": "2015",
"totalOffered": 60000,
"totalAccepted": 43500,
"categories": [
{
"id": 16823722,
"created_at": "2011/06/09 15:44:01 +0000",
"user_id": 355760,
"duration": 328797,
"commentable": true,
"state": "finished",
"sharing": "public",
"tag_list": "Soosh Jumble Fuse Texture Rustle Lyric Deep Soothing Beats",
"permalink": "upcoming-jumble-soosh-soosh-ep",
@christianvuerings
christianvuerings / sakai_oae_infusion_1_4
Created December 16, 2011 18:10
Fluid Infusion 1.4 within Sakai OAE
/* 3akai_Infusion.js
* custom build for Sakai
* built with: ant -lib lib/rhino customBuild -Dinclude="reorderer" -Dexclude="jQuery, jQueryUICore, jQueryUIWidgets, jQueryTooltipPlugin" -Djsfilename="3akai_Infusion.js" -DnoMinify="true"
*/
/*
Copyright 2007-2010 University of Cambridge
Copyright 2007-2009 University of Toronto
Copyright 2007-2009 University of California, Berkeley
Copyright 2010-2011 Lucendo Development Ltd.
def translate_errors(record)
ret = {}
record.errors.each do |key, message|
keystring = key.to_s
if keystring.include? '_content_type'
keystring.gsub!('_content_type', '')
key = keystring.to_sym
end
# Happens when you try to submit an invalid file (e.g. zip) as a screenshot
if keystring.include? '.'
@christianvuerings
christianvuerings / twitter_follow-the-following.js
Created October 17, 2012 05:22
Twitter - Follow the following
// Follow all people that someone follows
// 1. Go to a following URL - https://twitter.com/denbuzze/following
// 2. Run this script:
(function() {
var interval;
var scrollToBottom = function() {
interval = setInterval(function() {
$(document).scrollTop($(document).height());
$('.not-following .follow-button').trigger('click');