This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps xro %cpu=,comm= | while read cpu comm; ((i++<5)); do | |
int=$cpu | |
int="${int%%.*}" | |
if (($int >= 50)); then color=$'\e[31m'; | |
elif (($int >= 25)); then color=$'\e[33m'; | |
else color=$'\e[32m'; | |
fi; | |
echo "$color$cpu% $(basename "$comm")"$'\e[0m'""; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ps xmo rss=,pmem=,comm= | while read rss pmem comm; ((n++<5)); do | |
size="$[rss/1024]"; | |
short=$[4-${#size}]; | |
size="(${size}M)"; | |
i=0; | |
while ((i++ < short)); do size=" $size"; done; | |
pmem="${pmem%%.*}" | |
if (($pmem >= 20)); then color=$'\e[31m'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@mixin estee-extender($extendable, $mq:false) { | |
@if $mq { | |
@extend %#{$extendable}-#{$mq}; | |
} @else { | |
@extend %#{$extendable}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// Sass (v3.3.7) | |
// Compass (v1.0.0.alpha.18) | |
// ---- | |
@mixin estee-extender($extendable, $mq:false) { | |
@if $mq { | |
background: green; | |
} @else { | |
@extend %#{$extendable}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Script for setting Reminders for LaunchBar and Alfred | |
--For Alfred, Applescript must NOT be set to run in Background otherwise date parsing does not work | |
--For LaunchBar, place the script in ~/Library/Scripts/LaunchBar | |
--by Michelle L. Gill, 10/07/2012 | |
--Inspired by https://gist.github.com/3187630 | |
--A related Alfred version 2 workflow can be found here: https://github.com/mlgill/alfred-workflow-create-reminder | |
--Changes | |
--02/01/2013 * Fixed an issue with setting the time when the hour is 12 and AM/PM (12-hour clock) is used | |
-- * Removed the ability to set seconds for the time since Reminders doesn't recognize them |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Make elements align in a grid, regardless of height | |
// Apply to elements you want as grid items | |
// $cols = how many columns you want | |
// $margin-right = margin-right, should be in percent | |
// $ie8-height = an explicit height for all the elements, "off" by default, only applied to IE | |
@mixin gridify($cols, $margin-right: 5%, $ie8-height: auto) { | |
// Math for widths, margins, and clears | |
$width: (100% / $cols) - $margin-right + ($margin-right / $cols); | |
$ie-width: (100% / $cols) - $margin-right; | |
$clearnum: $cols + 1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/ruby | |
# Convert a Markdown README to HTML with Github Flavored Markdown | |
# Github and Pygments styles are included in the output | |
# | |
# Requirements: json gem (`gem install json`) | |
# | |
# Input: STDIN or filename | |
# Output: STDOUT | |
# Arguments: "-c" to copy to clipboard (or "| pbcopy"), or "> filename.html" to output to a file | |
# cat README.md | flavor > README.html |
NewerOlder