Skip to content

Instantly share code, notes, and snippets.

@jcave
jcave / DigitalOcean-BasicRailsSetup.md
Last active February 12, 2016 01:52
How to set up a DigitalOcean server with their 1-click Ubuntu/Rails/Ngnix/Unicorn/Mysql install

Basic Rails App on Digital Ocean / Ngnix / Unicorn

Most of this I got from the DigitalOcean file.

  1. Sign up for an account at digitalocean.com. Create a droplet using the pre-configed Ubuntu 12.10/Rails/Ngix/Unicorn option and using an ssh key if you set one up first. [An overview can be found here.] (https://www.digitalocean.com/community/articles/how-to-set-up-ssh-keys--2) If you don’t set up an SSH key, that's okay, DigitialOcean (DO) will send you one to your email.
  2. Once setup with an IP, point your domain or subdomain to the IP from wherever you are hosting as an A record. Log in using ssh root@ip.address.of.server. Enter your password if needed.
  3. Type passwd into the console to change the password of root to something you can remember.
  4. If you want add a new user so you don’t have to use root then type adduser [username] in the console. Feel free to fill out the Fu
@nodesocket
nodesocket / bootstrap.flatten.css
Last active April 1, 2021 23:37
Below are simple styles to "flatten" bootstrap. I didn't go through every control and widget that bootstrap offers, only what was required for https://commando.io, so your milage may vary.
/* Flatten das boostrap */
.well, .navbar-inner, .popover, .btn, .tooltip, input, select, textarea, pre, .progress, .modal, .add-on, .alert, .table-bordered, .nav>.active>a, .dropdown-menu, .tooltip-inner, .badge, .label, .img-polaroid {
-moz-box-shadow: none !important;
-webkit-box-shadow: none !important;
box-shadow: none !important;
-webkit-border-radius: 0px !important;
-moz-border-radius: 0px !important;
border-radius: 0px !important;
border-collapse: collapse !important;
background-image: none !important;
@cowboy
cowboy / jQuery immediate ready.js
Created November 5, 2010 16:32 — forked from ralphholzmann/jQuery immediate ready.js
Bind DOM ready event handlers before jQuery is loaded
// Create a "fake" jQuery function that accepts function arguments to be
// queued as DOM ready callbacks.
(function(window){
var fake = window.jQuery = window.$ = function( fn ) {
if ( Object.prototype.toString.call( fn ) === '[object Function]' ) {
fake.queue.push( fn );
}
};
@cowboy
cowboy / HEY-YOU.md
Last active April 9, 2024 15:54
jQuery Tiny Pub/Sub: A really, really, REALLY tiny pub/sub implementation for jQuery.