Skip to content

Instantly share code, notes, and snippets.

View saltcod's full-sized avatar

Terry Sutton saltcod

View GitHub Profile
— you might not need jQuery
> http://youmightnotneedjquery.com/
— Go Make Things
> http://gomakethings.com/ditching-jquery-for-vanilla-js/
> http://gomakethings.com/climbing-up-and-down-the-dom-tree-with-vanilla-javascript/
— ids & classes, together at last
> <div class="header-notification" id="header-notification"></div>
@saltcod
saltcod / .php
Created December 8, 2015 19:21
//Terry, don't do this
<?php ?>
// INSTEAD this is how you do it
<?php ?>
*~
.DS_Store
.svn
.cvs
.overcommit.yml
*.bak
*.swp
*.log
*.map
*.lock
@saltcod
saltcod / SassMeister-input.scss
Created June 23, 2015 17:59
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
.header {
// mobile modifier
&--mobile {
background: red;
}
@saltcod
saltcod / SassMeister-input.scss
Last active August 29, 2015 14:22
Generated by SassMeister.com.
// ----
// libsass (v3.2.5)
// ----
.header {
// mobile modifier
&--mobile {
background: red;
}
@saltcod
saltcod / SassMeister-input.scss
Created June 4, 2015 14:59
Generated by SassMeister.com.
// ----
// libsass (v3.2.4)
// ----
.header {
@at-root #{&}__nav {
background: green;
}
@at-root #{&}--mobile {
background: red;
@saltcod
saltcod / README.md
Last active August 29, 2015 14:10 — forked from timothyandrew/README.md

Introduction

  • This script lets you set up and use a temporary DigitalOcean droplet to download torrent files.
  • Once downloaded, they can be streamed down to your local machine.
  • This uses transmission-cli for the torrent client, and nginx to serve files.

Setup on Local Machine

  • This assumes that you have a DigitalOcean account and tugboat set up, as well as seedbox-setup.sh present in the current directory.
// Instead of declaring the &:hover rule every time, like this:
.widget > a {
color: green;
&:hover {
border-bottom: 1px solid;
}
}
// Make a mixin
.hover-underline(){
.site,
body.with-listing-chooser .listing-chooser.initialized{
display:none;
}
body.with-listing-chooser>.content, body.with-listing-chooser .footer-parent{
margin-left: 10px;
}
/**
* Maintenance Mode
*
* @since 0.1
function waterstreet_maintenace_mode() {
if ( !current_user_can( 'administrator' ) ) {