Skip to content

Instantly share code, notes, and snippets.

View czerasz's full-sized avatar

Michał Czeraszkiewicz czerasz

View GitHub Profile

(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:

@jackfranklin
jackfranklin / jack .vimrc
Created December 8, 2010 17:07
my vimrc file
"
".vimrc File
"Written by Jack Franklin
"A lot of this came from Jeffrey Way's video tutorials & his .vimrc file
"(jeffrey-way.com, net.tutsplus.com)
"
"Tabs
set tabstop=4
set shiftwidth=4
@boriscy
boriscy / gist:827469
Created February 15, 2011 12:44
Gemfile example
source :rubygems
gem "rails", ">= 3.0"
gem "rack"
gem "clearance", "0.9.0.rc9"
gem "haml"
gem "high_voltage"
gem "hoptoad_notifier"
gem "RedCloth", :require => "redcloth"
gem "paperclip"
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@morgoth
morgoth / deployer.rake
Created January 27, 2012 20:03
Rake task to copy local files to remote server via FTP
# Rake task to copy local files to remote server via FTP
# required credentials.yml file, that contains keys:
# server, username, password
require "net/ftp"
require "yaml"
class FTPClient
attr_reader :remote_path
@czerasz
czerasz / autossh.c
Last active July 25, 2016 01:58
useful commands
// Compile with
// gcc -o /etc/bin/autossh autossh.c
#include <stdio.h>
int main(int argc, char *argv[]) {
while(1) {
sleep(60);
printf(".\n");
}
}
@hzlzh
hzlzh / gist:3128038
Created July 17, 2012 08:31
console.log() snippet for Sublime Text 2
<snippet>
<!-- put this file in /packages/User/<Folder Name>/console_log.sublime-snippet then restart your Sublime Text 2 -->
<content><![CDATA[console.log($1);$0]]></content>
<tabTrigger>conl</tabTrigger>
<scope>text.html,source.js</scope>
<description>console.log()</description>
</snippet>
<snippet>
<!-- put this in another file /packages/User/<Folder Name>/console_dir.sublime-snippet then restart your Sublime Text 2 -->
@dergachev
dergachev / README.md
Created October 10, 2012 16:49
Vagrant tutorial

Vagrant Setup

This tutorial guides you through creating your first Vagrant project.

We start with a generic Ubuntu VM, and use the Chef provisioning tool to:

  • install packages for vim, git
  • create user accounts, as specified in included JSON config files
  • install specified user dotfiles (.bashrc, .vimrc, etc) from a git repository

Afterwards, we'll see how easy it is to package our newly provisioned VM

@jlong
jlong / SassMeister-input.scss
Created February 1, 2014 22:53
Navigate a nested maps with map-fetch() in Sass
// ----
// Sass (v3.3.0.rc.2)
// Compass (v1.0.0.alpha.17)
// ----
//
// map-fetch($map, $keys)
//
// An easy way to fetch a deep value in a multi-level map. Works much like
// map-get() except that you pass multiple keys as the second parameter to
@lewisd32
lewisd32 / iptableflip.sh
Created April 15, 2015 18:20
Snippet of Unbounce script for restarting HAProxy with zero downtime
echo "Flipping tables! (╯°□°)╯︵ ┻━┻"
num_rules=3
real=3 # exposed to the ELB as port 443
test=4 # used to install test certs for domain verification
health=5 # used by the ELB healthcheck
blue_prefix=855
green_prefix=866