Skip to content

Instantly share code, notes, and snippets.

View himedlooff's full-sized avatar

Mike Morici himedlooff

View GitHub Profile
/* topdoc
name: Padded container
family: cfgov-misc
notes:
- ".padded-container is meant to contain anything you want with consistent
padding. It uses a margin collapsing trick in CSS to achieve this
consistency which this is why .line-container_body is needed. The only
caveat to this consistency is if you place something inside of it that has
a bottom-margin that is larger than the .padded-container padding."
patterns:
{
"caret_style": "wide",
"color_scheme": "Packages/User/SublimeLinter/base16-eighties.dark (SL).tmTheme",
"create_window_at_startup": false,
"detect_indentation": false,
"draw_white_space": "all",
"find_selected_text": true,
"font_face": "Input Mono",
"font_size": 14.0,
"highlight_line": true,
@himedlooff
himedlooff / names.md
Last active August 29, 2015 14:15
game company ideas
  • working for the weekend
  • make em fast games
  • ship it games
  • build, break, repeat
  • rapido
  • Ándale!
  • week-end developers (a nod to front-end?)
  • weakened we can do it dev
  • weak-end dev (mashup of weakened and the -end in front-end)
  • 48 hour games
@himedlooff
himedlooff / example.less
Last active August 29, 2015 14:09
An example of inline print styles.
.respond-to-print(@rules) {
@media print {
@rules();
}
}
.filtered-by {
margin: 0;
&_filter {
@himedlooff
himedlooff / css-comments-regex.js
Last active August 29, 2015 14:05
JS Regex to find CSS comments
var cssComments = \(\/\*.(?:|\s*|\S*|\n*)*\*\/)\;
(function( $ ) {
$.fn.revealOnFocus = function( userSettings ) {
return $( this ).each(function() {
var $this = $( this ),
$target = $this.find('.reveal-on-focus_target'),
$content = $this.find('.reveal-on-focus_content');
$content.hide();
@himedlooff
himedlooff / string-replace.js
Created April 29, 2014 15:12
A Grunt string-replace task option for replacing CSS url() paths.
{
pattern: /url\((.*?)\)/ig,
replacement: function (match, p1, offset, string) {
var path, pathParts, pathLength, filename, newPath;
path = p1.replace(/["']/g,''); // Removes quotation marks if there are any
pathParts = path.split('/'); // Splits the path so we can find the filename
pathLength = pathParts.length;
filename = pathParts[pathLength-1]; // The filename is the last item in pathParts
// Rewrite the path based on the file type
# Fill with minuses
# (this is recalculated every time the prompt is shown in function prompt_command):
fill="—- "
reset_style='\[\033[00m\]'
status_style=$reset_style'\[\033[0;90m\]' # gray color; use 0;37m for lighter color
prompt_style=$reset_style
command_style=$reset_style'\[\033[1;29m\]' # bold black
# Prompt variable:
@himedlooff
himedlooff / gfm.css
Created March 28, 2014 14:07
Styling used on GitHub.com to render markdown file previews.
.markdown-body {
font-size: 15px;
line-height: 1.7;
overflow: hidden;
word-wrap: break-word;
}
.markdown-body>*:first-child {
margin-top: 0 !important;
}
var $dif = $('.js-details-container');
$dif.each(function(index){
$thisDif = $(this);
$buttons = $thisDif.find('.meta .actions .button-group');
$review = $('<a href="#" class="button minibutton diff-review">Mark as reviewed<code></code></a>');
$collapse = $('<a href="#" class="button minibutton diff-collapse">Collapse<code></code></a>');
$buttons.append($review);