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') {
@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;

Keybase proof

I hereby claim:

  • I am tyom on github.
  • I am tyom (https://keybase.io/tyom) on keybase.
  • I have a public key whose fingerprint is 070D 4B95 A4C5 F5A6 09A4 52F0 DD60 5FE8 EA45 DAE0

To claim this, I am signing this object:

@tyom
tyom / package.json
Last active August 3, 2016 00:16
Simple Webpack Dev Server + Sass config
{
"devDependencies": {
"babel-core": "^6.11.4",
"babel-loader": "^6.2.4",
"babel-preset-es2015": "^6.9.0",
"babel-register": "^6.11.6",
"css-loader": "^0.23.1",
"extract-text-webpack-plugin": "^1.0.1",
"file-loader": "^0.9.0",
"node-sass": "^3.8.0",