Skip to content

Instantly share code, notes, and snippets.

Avatar

Max Kohler awesomephant

View GitHub Profile
View .vimrc
set history=500
filetype plugin on
filetype indent on
set autoread
set tabstop=2
set shiftwidth=2
set expandtab
set showmatch
@awesomephant
awesomephant / map-style.json
Created Apr 27, 2021
Black and White Map Style
View map-style.json
[
{
"elementType": "geometry",
"stylers": [
{
"color": "#f5f5f5"
}
]
},
{
View test.css
* {
color: red !important;
}
View test.html
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Delectus sit quibusdam rem quaerat, laboriosam voluptas
accusantium animi sint et itaque doloremque saepe. Consectetur fugiat ipsa numquam aperiam asperiores aliquam
adipisci ad! Velit est nam pariatur eum explicabo perferendis unde nobis.</p>
<button class="more">More</button>
<div class="hidden">
<p>Lorem, ipsum dolor sit amet consectetur adipisicing elit. Delectus sit quibusdam rem quaerat, laboriosam voluptas
accusantium animi sint et itaque doloremque saepe. Consectetur fugiat ipsa numquam aperiam asperiores aliquam
adipisci ad! Velit est nam pariatur eum explicabo perferendis unde nobis.</p>
View index.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Kat's cool websiteee</title>
<link rel="stylesheet" href="style.css">
</head>
<body>
<h1 class='name'>Kat Mcgrath</h1>
View kat.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
@awesomephant
awesomephant / bp.scss
Created May 26, 2019
Sass breakpoint mixin
View bp.scss
@mixin bp($point) {
@if $point==xl {
@media (min-width: 85rem) {
@content;
}
}
@else if $point==l {
@media (min-width: 70rem) {
@content;
}
View test.js
console.log('Hello World 123')
@awesomephant
awesomephant / mousemove.js
Last active Jan 24, 2019
Mousemove Optimized
View mousemove.js
var last_known_scroll_position = 0;
var ticking = false;
function doSomething(scroll_pos) {
// do something with the scroll position
}
window.addEventListener('mousemove', function(e) {
last_known_position = {
View parseSwitchboard.js
const fs = require('fs');
const path = require('path');
const parse = require('csv-parse/lib/sync');
const mkdirp = require('mkdirp');
const dataDir = './data/switchboard_conversations/';
const outputDir = './data/clean/';
let topics = fs.readdirSync(dataDir)
let data = [];