Skip to content

Instantly share code, notes, and snippets.

View adamstac's full-sized avatar

Adam Stacoviak adamstac

View GitHub Profile
@adamstac
adamstac / gist:7462464
Created November 14, 2013 06:42
How to set the timezone on Ubuntu

How to set the timezone on Ubuntu

You can check your current timezone by just running...

$ date
$ Thu Nov 14 00:39:05 CST 2013

You can also check the timezone file...

$ more /etc/timezone

@adamstac
adamstac / gist:7462202
Last active January 5, 2024 00:01
Install and configure Sendmail on Ubuntu

Install and configure Sendmail on Ubuntu

This should help you get Sendmail installed with basic configuration on Ubuntu.

  1. If sendmail isn't installed, install it: sudo apt-get install sendmail
  2. Configure /etc/hosts file: nano /etc/hosts
  3. Make sure the line looks like this: 127.0.0.1 localhost yourhostname
  4. Run Sendmail's config and answer 'Y' to everything: sudo sendmailconfig
  5. Restart apache sudo service apache2 restart

Pour Over Brew Method

Notes

  • Grind coffee beans at medium or regular coarseness setting
  • Start with a ~16:1 water:coffee ratio and tune to your coffee
  • Wet the filter before adding coffee to remove paper taste
  • Wet ground coffee and allow to 'bloom' for 1 minute
  • Slowly pour water in a circular, nickel size pattern
@adamstac
adamstac / application.html.erb
Created August 21, 2013 05:53
Application layout template for a Rails based iOS web application
<!DOCTYPE html>
<!-- paulirish.com/2008/conditional-stylesheets-vs-css-hacks-answer-neither/ -->
<!--[if lt IE 7 ]> <html class="ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]> <html class="ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]> <html class="ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--> <html lang="en"> <!--<![endif]-->
<head>
<meta charset="utf-8" />
<meta name="apple-mobile-web-app-capable" content="yes">
@adamstac
adamstac / functions.php
Created July 31, 2013 15:05
Hide WordPress toolbar for non-admins
<?php
//
// Hide WordPress toolbar for non-admins
//
if ( !current_user_can('administrator') ) {
show_admin_bar(false);
}
?>
@adamstac
adamstac / gist:6122773
Created July 31, 2013 15:05
Hide WordPress toolbar for non-admins
<?php
//
// Hide WordPress toolbar for non-admins
//
if ( !current_user_can('administrator') ) {
show_admin_bar(false);
}
?>
adamstacoviak@AS-MBP-i7 [06:11:14] [~]
-> % vagrant init precise32 http://files.vagrantup.com/precise32.box
A `Vagrantfile` has been placed in this directory. You are now
ready to `vagrant up` your first virtual environment! Please read
the comments in the Vagrantfile as well as documentation on
`vagrantup.com` for more information on using Vagrant.
adamstacoviak@AS-MBP-i7 [06:12:23] [~]
-> % vagrant up
Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
@adamstac
adamstac / _typekit-fout.scss
Last active December 14, 2015 07:18
Prevents Typekit FOUT by setting visibility: hidden; on the class .wf-loading while fonts are loading
// Typekit FOUT
//------------------------------------------------
// References:
// 1. http://blog.typekit.com/2010/10/29/font-events-controlling-the-fout/
//
.wf-loading {
visibility: hidden;
}
@adamstac
adamstac / _font-smoothing.scss
Created February 27, 2013 15:46
WebKit font-smoothing Sass mixin
// WebKit font-smoothing
//------------------------------------------------
// References:
//
// 1. http://maxvoltar.com/sandbox/fontsmoothing/
// 2. http://maxvoltar.com/archive/-webkit-font-smoothing
//
// Values: none, antialiased (default), subpixel-antialiased
//
@adamstac
adamstac / ia-writer
Created December 12, 2012 21:08
Open with iA Writer from the command line
# Opens a file using iA Writer (if installed)
# Example: ia README.md
alias ia='open $1 -a /Applications/iA\ Writer.app'