Skip to content

Instantly share code, notes, and snippets.

View awesomephant's full-sized avatar
😤

Max Kohler awesomephant

😤
View GitHub Profile
@awesomephant
awesomephant / bp.scss
Last active December 17, 2015 12:39
Sass breakpoint mixin
@mixin bp($point) {
@if $point == l {
@media (min-width: 65rem) { @content; }
}
@else if $point == m {
@media (min-width: 45rem) { @content; }
}
@else if $point == s {
@media (min-width: 35rem) { @content; }
}
@awesomephant
awesomephant / index.html
Created May 20, 2013 11:04
A CodePen by awesomephant. Sass Ribbon Generator. - A sass thing that adds a badge to elements with a data-badge attribute.
<header>
<h1 class='title'>Sass Ribbon Generator.</h1>
<p class='tagline'>Fully customizable, variable font-size, uses the data-badge attribute + pseudo elements, comes with two awesome styles. Proudly presented by <a href='https://twitter.com/awesomephant'>@awesomephant</a></p>
</header>
<section class='demo'>
<figure class='product' data-badge='new'>
<img src='http://www.lorempixel.com/600/700/technics/10'/>
<figcaption>
<h2>Some Cool Product</h2>
<span class='description'>And some awesome description.</span>

##Why would this be the best experience? What is this magic 'experience' thing designers are always after? In our case, a good experience means being able to read stuff and understand the content. Typography helps us make that task as easy as possible for the users.

##But why would we, for an interface for an online encyclopedia and similar, need something so specific at all? As an Encyclopedia, reading stuff is the primary thing people will do our site. It makes sense to make that reading experience as pleasant as possible, because better typography will ultimately help people understand the content easier. There's more factors to good typography than the typeface, such as spacing, color, and size. These things need to be adjusted to

@awesomephant
awesomephant / main.js
Last active August 29, 2015 14:06
Codecanyon Simple Notifications
$(document).ready(function(){
$('.close').click(function(){
var box = $(this).parent();
box.addClass('inactive');
window.setTimeout(function(){
box.remove()
}, 700)
})
});
@awesomephant
awesomephant / render.js
Last active August 29, 2015 14:16
Code for "Good Morning Twitter"
var fs = require('fs');
var moment = require('moment');
var width = 3000;
var height = 4000;
var scaleX = (width - 100 ) / (360 +20);
var scaleY = (height + 00) / (24 * 60);
var offsetTop = 0;
var calcX = function(n){
@awesomephant
awesomephant / loadChessData.js
Created March 23, 2017 20:00
Casper.js script to load chess openings
var fs = require('fs')
var casper = require('casper').create();
casper.options.waitTimeout = 10000;
var games;
var count = 0;
var nextLink = 'http://www.chessgames.com/perl/chess.pl?tid=53788';
var parsePage = function () {
var rows = document.querySelectorAll('table[cellpadding="3"]:nth-of-type(2) tr');
var games = [];
var mapRange = function(n, range, targetRange) {
var x =
(n - range[0]) / (range[1] - range[0]) * (targetRange[1] - targetRange[0]) +
targetRange[0];
return x;
};
const gra = function(min, max) {
return Math.random() * (max - min) + min;
}
const gri = function(min, max) {
return Math.floor(Math.random() * (max - min + 1)) + min;
}
sudo apt-get install git
sudo apt-get install curl
curl -sL https://deb.nodesource.com/setup_8.x | sudo -E bash -
sudo apt-get install -y nodejs
cd Documents/
https://github.com/awesomephant/sineMachine.git
@awesomephant
awesomephant / wp-setup
Last active April 1, 2018 12:51
Install common WP plugins
cd ap ; wp core update ; wp plugin update --all; wp theme update --all ; wp plugin delete hello ; wp plugin delete akismet ; wp plugin install custom-post-type-ui --activate ; wp plugin install timber-library --activate ; wp plugin install woocommerce --activate ; cd .. ; cd aside ; wp core update ; wp plugin update --all; wp theme update --all ; wp plugin delete hello ; wp plugin delete akismet ; wp plugin install custom-post-type-ui --activate ; wp plugin install timber-library --activate ; cd .. ; cd zwicker ; wp core update ; wp plugin update --all; wp theme update --all ; wp plugin delete hello ; wp plugin delete akismet ; wp plugin install custom-post-type-ui --activate ; wp plugin install timber-library --activate ; cd .. ; cd humboldt ; wp core update ; wp plugin update --all; wp theme update --all ; wp plugin delete hello ; wp plugin delete akismet ; wp plugin install custom-post-type-ui --activate ; wp plugin install timber-library --activate ; cd .. ; cd particitype ; wp core update ; wp plugin upd