Skip to content

Instantly share code, notes, and snippets.

View scottlaplant's full-sized avatar

Scott scottlaplant

View GitHub Profile
@scottlaplant
scottlaplant / remove-git-ignored-files.md
Created February 1, 2024 23:06 — forked from itsnwa/remove-git-ignored-files.md
Remove files git ignored files from remote repository

$ git rm -r --cached . && git add . && git commit -m "Removing all files in .gitignore"

@scottlaplant
scottlaplant / unfave.rb
Created April 12, 2021 08:29 — forked from robinsloan/unfave.rb
Unfave script, because why not??
#!/usr/bin/env ruby
require "rubygems"
require "twitter"
require "json"
require "faraday"
# things you must configure
TWITTER_USER = "your_username"
# get these from dev.twitter.com
@scottlaplant
scottlaplant / a-medium-style-layout.markdown
Last active February 17, 2019 12:03
A Medium Style Layout
@scottlaplant
scottlaplant / flattastic-pro-color-palette.markdown
Created February 17, 2019 03:50
Flattastic Pro Color Palette
@scottlaplant
scottlaplant / accessible-medium-style-dividers.markdown
Created February 17, 2019 03:38
Accessible Medium Style Dividers

Accessible Medium Style Dividers

After I saw Rafal Chmiel's pen with Medium style dividers on the CodePen frontpage I thought to myself This should be possible with simpler markup that is accessible.

Updated in June 2015: Markdown no longer renders if placed inside HTML on CodePen.

A Pen by Zoë on CodePen.

License.

@scottlaplant
scottlaplant / index.html
Created February 17, 2019 03:36
Medium Layout clone!
<html>
<head>
<title>Medium Layout</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css">
</head>
<nav>
<ul class="write-story">
<li>Write a Story</li>
</ul>
<h1 class="main heading">Medium</h1>
@scottlaplant
scottlaplant / index.html
Created February 13, 2019 04:23
Medium clap with vanilla JS
<div class="container">
<button class="claps_button">
<svg class="svgIcon-use" width="33" height="33" viewBox="0 0 33 33"><path d="M28.86 17.342l-3.64-6.402c-.292-.433-.712-.729-1.163-.8a1.124 1.124 0 0 0-.889.213c-.63.488-.742 1.181-.33 2.061l1.222 2.587 1.4 2.46c2.234 4.085 1.511 8.007-2.145 11.663-.26.26-.526.49-.797.707 1.42-.084 2.881-.683 4.292-2.094 3.822-3.823 3.565-7.876 2.05-10.395zm-6.252 11.075c3.352-3.35 3.998-6.775 1.978-10.469l-3.378-5.945c-.292-.432-.712-.728-1.163-.8a1.122 1.122 0 0 0-.89.213c-.63.49-.742 1.182-.33 2.061l1.72 3.638a.502.502 0 0 1-.806.568l-8.91-8.91a1.335 1.335 0 0 0-1.887 1.886l5.292 5.292a.5.5 0 0 1-.707.707l-5.292-5.292-1.492-1.492c-.503-.503-1.382-.505-1.887 0a1.337 1.337 0 0 0 0 1.886l1.493 1.492 5.292 5.292a.499.499 0 0 1-.353.854.5.5 0 0 1-.354-.147L5.642 13.96a1.338 1.338 0 0 0-1.887 0 1.338 1.338 0 0 0 0 1.887l2.23 2.228 3.322 3.324a.499.499 0 0 1-.353.853.502.502 0 0 1-.354-.146l-3.323-3.324a1.333 1.333 0 0 0-1.886 0 1.325 1.325 0 0 0-.39.943c0 .35
@scottlaplant
scottlaplant / bootstrap_autohiding_navbar.js
Created February 11, 2018 19:25 — forked from fathyar/bootstrap_autohiding_navbar.js
Just look at the navbar and play with the scrollbar of the page ;) You only have to include the source javascript file and then initialize it with the following code: <script>$("div.navbar-fixed-top").autoHidingNavbar();</script>
/*
* Bootstrap Auto-Hiding Navbar - v1.0.5
* An extension for Bootstrap's fixed navbar which hides the navbar while the page is scrolling downwards and shows it the other way. The plugin is able to show/hide the navbar programmatically as well.
* http://www.virtuosoft.eu/code/bootstrap-autohidingnavbar/
*
* Made by István Ujj-Mészáros
* Under Apache License v2.0 License
*/
!function(a,b,c,d){function e(b,c){this.element=a(b),this.settings=a.extend({},w,c),this._defaults=w,this._name=m,this.init()}function f(b){v&&(b.element.addClass("navbar-hidden").animate({top:-1*parseInt(b.element.css("height"),10)+b.settings.navbarOffset},{queue:!1,duration:b.settings.animationDuration}),a(".dropdown.open .dropdown-toggle",b.element).dropdown("toggle"),v=!1,b.element.trigger("hide.autoHidingNavbar"))}function g(a){v||(a.element.removeClass("navbar-hidden").animate({top:0},{queue:!1,duration:a.settings.animationDuration}),v=!0,a.element.trigger("show.autoHidingNavbar"))}function h(a){var b=n.scrollTop(),c=b-t;i

Launch Sublime Text 3 from the Mac OS X Terminal

ln -s "/Applications/Sublime Text.app/Contents/SharedSupport/bin/subl" /usr/local/bin/mate

Note I used 'mate' instead of subl. It's a holdover from a time when I used textmate and it's just more awesome than subl!

@scottlaplant
scottlaplant / SublimeTextDefaultHTML
Last active February 28, 2016 15:22
Create default document type in Sublime Text
Make default document Sublime Text 3 creates is HTML
Go to Tools -> New Plugin
Then paste this over the file, hit save and call it "DefaultHTML.py" or whatever you like
import sublime, sublime_plugin
class EverythingIsHTML(sublime_plugin.EventListener):
def on_new(self, view):