Skip to content

Instantly share code, notes, and snippets.

View knice's full-sized avatar

Rob Knight knice

View GitHub Profile
@knice
knice / _block-header.scss
Last active January 20, 2016 22:14
Code for the header
.block-header {
margin-top: 0;
position: relative;
h1 {
position: absolute;
width: 100%;
left: 6vw;
top: 14vw;
font-weight: 600;
@knice
knice / sinatra_docker.md
Created January 22, 2016 04:23
Sinatra (modular) & Docker
require "sinatra/base"

class App < Sinatra::Base
  set :bind, "0.0.0.0"
    
  get "/status" do
    "ok"
  end
end
@knice
knice / gh-pages-deploy.md
Created April 3, 2016 23:30 — forked from cobyism/gh-pages-deploy.md
Deploy to `gh-pages` from a `dist` folder on the master branch. Useful for use with [yeoman](http://yeoman.io).

Deploying a subfolder to GitHub Pages

Sometimes you want to have a subdirectory on the master branch be the root directory of a repository’s gh-pages branch. This is useful for things like sites developed with Yeoman, or if you have a Jekyll site contained in the master branch alongside the rest of your code.

For the sake of this example, let’s pretend the subfolder containing your site is named dist.

Step 1

Remove the dist directory from the project’s .gitignore file (it’s ignored by default by Yeoman).

@knice
knice / stylish.css
Created May 9, 2016 19:12
Stylish CSS for facebook.com
.home_right_column,
#pagelet_trending_tags_and_topics,
#pagelet_ego_pane { display: none !important; }

To the members of the MIT community:

We are writing to inform you of plans to upgrade the MIT campus network, and in particular to upgrade MIT to the next generation of Internet addressing. (Please note that no action is required on your part.)

Machines on the Internet are identified by addresses. The current addressing scheme, called IPv4, was specified around 1980, and allowed for about 4 billion addresses. That seemed enough at the time, which was before local area networks, personal computers and the like, but the Internet research community recognized around 1990 that this supply of addresses was inadequate, and put in place a plan to replace the IPv4 addresses with a new address format, called IPv6. IPv6 uses a 128-bit address scheme and is capable of 340 undecillion addresses (340 times 10^36, or 340 trillion trillion trillion possible IP addresses). This stock of addresses allows great flexibility in how addresses are assigned to hosts, for example allowing every host to use a range of addresses to

@knice
knice / .editorconfig
Created November 22, 2019 21:42
editorconfig defaults for the UCSC web team
# editorconfig.org
root = true
[*]
indent_style = space
indent_size = 2
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true
@knice
knice / code-changes.md
Last active June 15, 2021 18:00
WCMS block changes for 2021 server upgrade

Process for updating global footer blocks for WCMS sites

For the copyright year (all pages)

  1. Edit the block: uniform-campus-footer
  2. In the code view, remove this code: <!--#config timefmt="%Y" --><!--#echo var="DATE_LOCAL" -->
  3. Replace it with this code: <!--#passthrough<?php echo date('Y'); ?>#passthrough-->

For the check-ip (hidden) span tag in the bottom of the page (all pages)

@knice
knice / settings.json
Created August 19, 2021 16:32
VS Code settings
{
"editor.fontSize": 13,
"editor.fontFamily": "'Fira Code', 'JetBrains Mono', 'Source Code Pro', 'Input Mono', 'Menlo'",
"editor.renderLineHighlight": "gutter",
"editor.matchBrackets": "near",
"terminal.integrated.confirmOnExit": false,
"emmet.triggerExpansionOnTab": true,
"editor.quickSuggestions": true,
"editor.formatOnPaste": true,
"editor.lineHeight": 20,
@knice
knice / fractal.config.js
Created January 12, 2022 22:00
Fractal draft config
"use strict";
/* Create a new Fractal instance and a theme instance */
const fractal = (module.exports = require("@frctl/fractal").create());
const pkg = require("./package.json");
const context = {
package: {
name: "Truss Design System",
version: pkg.version,
@knice
knice / overview.md
Last active January 28, 2022 16:58
Web Renewal Project, 2022

Web Renewal Project, 2022

An overview of the major parts of the project.

1. Truss Design System

The tools and documentation that give campus personnel the ability to create branded websites and web applications.

  • a.1 contains initial components (<10) and docs as proof of concept for feedback (2/5/2022)
  • b.1 contains all of the components identified in the current WCMS templates
  • b.2 contains new components identified as necessary for branded websites