Skip to content

Instantly share code, notes, and snippets.

View tyom's full-sized avatar

Tyom Semonov tyom

View GitHub Profile
body {
background: #222;
color: #ddd;
white-space: pre;
font-family: monospace;
}
a {
color: #6482c8;
}
@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 / 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:

(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 / 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;