Skip to content

Instantly share code, notes, and snippets.

@christianvuerings
christianvuerings / calcentral_image.sh
Created March 25, 2013 23:32
Search for image files in Calcentral
#!/bin/bash
FILES=app/assets/images/*.*
for f in $FILES
do
filename=`basename $f`
echo $filename
ack --ignore-dir=log --ignore-dir=.idea --nobinary $filename
#grep -Ir --exclude=".idea\*" --exclude="*.log" "$filename" ./
done
@christianvuerings
christianvuerings / quotes.json
Last active December 5, 2022 00:21
A list of my favourite quotes.
{
"quotes": [
{
"author": "Abraham Lincoln",
"quote": "Things may come to those who wait, but only the things left by those who hustle.",
"image": "http://upload.wikimedia.org/wikipedia/commons/1/1b/Abraham_Lincoln_November_1863.jpg"
},
{
"author": "Adam Smith",
"quote": "The great secret of education is to direct vanity to proper objects.",
@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": [
@christianvuerings
christianvuerings / eslint-plugin-jsx-a11y_to-json.js
Last active September 14, 2016 17:07
Convert all the rules on the eslint-plugin-jsx-a11y github page to a JSON page we can use in our repo
// 1. Go to https://github.com/evcohen/eslint-plugin-jsx-a11y/tree/master/docs/rules
// 2. Run the following script:
(() => {
let output = {};
[...document.querySelectorAll('.files .js-navigation-item .content a[title]')]
.forEach(file => output[`jsx-a11y/${file.getAttribute('title').replace('.md', '')}`] = 2)
console.log(JSON.stringify(output, null, 4));
})()
@christianvuerings
christianvuerings / gestalt-release-notes.js
Last active August 3, 2017 14:35
Gestalt release notes generation
// Gestalt release notes generation
// 1. Go to https://github.com/pinterest/gestalt/commits/master
// 2. Run the script below
[...document.querySelectorAll('.commit-title')]
.map(commitTitle => `* ${commitTitle.innerText.replace(' …', '')}`)
.join("\n");