Skip to content

Instantly share code, notes, and snippets.

View cornellsteven's full-sized avatar

Cornell Campbell cornellsteven

View GitHub Profile
@cornellsteven
cornellsteven / label-outline-variant.scss
Last active November 20, 2019 20:18
[Outlined labels mixin for Bootstrap 4.*]
@mixin label-outline-variant(
$color,
$color-hover: color-yiq($color),
$active-background: $color,
$active-border: $color
) {
color: $color;
border-color: $color;
&:hover {
@cornellsteven
cornellsteven / twbs-5-columns.less
Last active November 2, 2015 22:11
Quick code snippet for 5-column layout in Twitter Bootstrap
/*
Thanks to Pawel @ wearesicc.com
Source: http://www.wearesicc.com/quick-tips-5-column-layout-with-twitter-bootstrap
*/
.col-xs-15,
.col-sm-15,
.col-md-15,
.col-lg-15 {
position: relative;
@cornellsteven
cornellsteven / Looping in LESS.markdown
Last active September 28, 2015 22:01
Looping in LESS
@cornellsteven
cornellsteven / remove-html-attributes.php
Last active August 29, 2015 14:16
Quick (and probably imperfect) regex for removing all attributes form HTML
<?php
$string = '<table border="2" cellpadding="5" cellspacing="2">
<tr>
<th style="width: 50%;" align="center">Header 1</th>
<th align="center">Header 2</th>
</tr>
<tr>
<td class="odd">Content 1</td>
<td class="even" style="text-align: left;">Content 2</td>
@cornellsteven
cornellsteven / jsbin.vudiz.css
Created May 23, 2014 15:39
CSS segmented circle loading animation
*,
*:before,
*:after {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
}
body {
background: #2c3e50;
<?php
session_start();
define('LOG', '/path/to/log/file');
if (isset($_GET['ajax'])) {
$handle = fopen(LOG, 'r');
fseek($handle, 0, SEEK_END);
$offset = ftell($handle);
@cornellsteven
cornellsteven / index.html
Created June 22, 2012 14:20
A web page created at CodePen.io
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>Light Metal Volume Dial &middot; CodePen</title>
<style>