Skip to content

Instantly share code, notes, and snippets.

@tyom
tyom / custom.css
Created August 10, 2011 00:22
Make Chrome DevTools Styles pane properties appear more like Firebug
.styles-section .properties li.disabled .enabled-button {
visibility: visible !important;
}
.styles-section .properties li > .webkit-css-property {
color: green !important;
}
.styles-section .properties li {
line-height: 15px !important;
color: #0000ae !important;

(a gist based on the old toolmantim article on setting up remote repos)

To collaborate in a distributed development process you’ll need to push code to remotely accessible repositories.

This is somewhat of a follow-up to the previous article setting up a new rails app with git.

For the impatient

Set up the new bare repo on the server:

@tyom
tyom / Git remote server receive hooks
Created January 23, 2012 09:59
Managing remote repository on a server and receive hooks
First, create a new local git repo:
$ mkdir my-project && cd my-project
$ git init
Initialized empty Git repository in ~/projects/my-project/.git/
$ echo 'Hello, world!' > index.html
$ git add index.html
$ git commit -q -m "Initial commit"
Then, on the remote server create a new directory for the new repo we just created:
@tyom
tyom / JS Namespacing.js
Created January 26, 2012 15:56
JS Namespace function
var MYAPP = MYAPP || {};
// Namespacing function. Simplifies the process of namespacing
// Usage: MYAPP.namespace('MYAPP.path.to.myModule'); or MYAPP.namespace('path.to.myModule');
MYAPP.namespace = function(ns_string) {
var parts = ns_string.split('.'),
parent = MYAPP,
i;
// strip redundant leading global
if(parts[0] === 'MYAPP') {
body {
background: #222;
color: #ddd;
white-space: pre;
font-family: monospace;
}
a {
color: #6482c8;
}
@tyom
tyom / index.html
Created April 11, 2013 13:12
A CodePen by douglasdeodato. Single Element Pure CSS MacBook Pro - This is just an experiment! There are certainly better ways to show an image of a MacBook, but none as fun as this :)
<i class="macbook"></i>
@tyom
tyom / CSSSelectorCounter.js
Last active December 17, 2015 13:59
Count CSS selectors on current page
(function() {
var styleSheets = document.styleSheets;
for (var j = 0; j < styleSheets.length; j++) {
if (styleSheets[j].href) {
var stylesheet = styleSheets[j];
var rules = stylesheet.rules;
var totalSelectors = 0;
for (var i = 0; i < rules.length; i++) {
@tyom
tyom / .irbrc
Last active December 19, 2015 09:29
Use Pry (Rails) and Awesome Print outside of Bundler in Rails 3 (when other Rails developers don't want you adding good stuff into Gemfile)
begin
require 'pry-rails'
require 'awesome_print'
Pry.start
exit
rescue LoadError => e
warn 'Unable to load gems'
puts e
end
@tyom
tyom / launch.command
Created January 6, 2014 14:53
Launch Python local server for script directory. Useful for distributing static HTML prototypes (e.g. Middleman builds) with simple instructions: "Double-click on `launch.command`".
#!/bin/bash
cd `dirname $0` && open "http://localhost:8000" && python -m SimpleHTTPServer;
@tyom
tyom / .editorconfig
Last active April 12, 2018 08:48
Editorconfig settings
# http://editorconfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_style = space
insert_final_newline = true
trim_trailing_whitespace = true