Skip to content

Instantly share code, notes, and snippets.

@geedelur
geedelur / capistrano_windows.textile
Created July 30, 2012 16:13
Cygwin + Ruby + RubyGems => Deploy with Capistrano from Windows
@geedelur
geedelur / ubuntu12server_mate.textile
Created July 30, 2012 16:18
Ubuntu Server 12.04 + MATE + LightDM
@geedelur
geedelur / git-flow_windows.textile
Created July 30, 2012 16:31
Git-flow Windows Install
@geedelur
geedelur / capistrano_ubuntu.textile
Created July 30, 2012 18:09
Capistrano Install on Ubuntu

Deploy with Capistrano from Ubuntu

  1. Install RVM and Ruby
    • sudo apt-get install build-essential openssl libreadline6 libreadline6-dev curl git zlib1g zlib1g-dev libssl-dev libyaml-dev libsqlite3-dev sqlite3 libxml2-dev libxslt-dev autoconf libc6-dev ncurses-dev automake libtool bison subversion git
    • curl -L https://get.rvm.io | bash -s stable --ruby
    • source ~/.rvm/scripts/rvm
  1. Install Capistrano gems
@geedelur
geedelur / gist:4009871
Created November 4, 2012 02:27 — forked from tkersey/gist:1130675
Getting a Motorola SBG6580 into “Bridge” mode

found at: http://fascinated.fm/post/2379188731/getting-a-motorola-sbg6580-into-bridge-mode-on

Getting a Motorola SBG6580 into “Bridge” mode on TimeWarner Wideband

  1. Unplug coax cable from Motorola
  2. Hold down the white reset button on the back panel with a pen for 30s.  This resets all settings to factory defaults. The modem will be auto-reconfigured once you plug in the coax cable.
  3. When modem is back on plug in a computer with an Ethernet cable into the modem.
  4. Connect to http://192.168.0.1 and login with “admin” / “motorola”
  5. Now you will make some changes:
 
  • Wireless -> Primary Network -> Disabled
The typical process for creating an SSL certificate is as follows:
# openssl genrsa -des3 -out www.key 2048
Note: When creating the key, you can avoid entering the initial passphrase altogether using:
# openssl genrsa -out www.key 2048
At this point it is asking for a PASS PHRASE (which I will describe how to remove):
Enter pass phrase for www.key:
# openssl req -new -key www.key -out www.csr
Next, you will typically send the www.csr file to your registrar. In turn, your registrar will provide you with the .crt (certificate) file.
From a security standpoint utilizing a passphrase, is a good thing, but from a practical standpoint not very useful.
#!/bin/bash
### User Settings (things you must set)
## Location of the dnscurl.pl script
DNSCurl="/path/to/route53DynDNS/dnscurl.pl"
## The host name you wish to update/create
myHostName="*"
## Zone/domain in which host (will) reside(s)
myDomainName="example.com"
@geedelur
geedelur / resize_image_summernote.js
Last active December 28, 2015 16:59
callback function for summernote (https://github.com/HackerWins/summernote/) onImageUpload event that resizes the images before sending them to the server
function summernoteOnImageUpload(files, editor, welEditable) {
$.each(files, function(idx, file) {
var max_width = 400;
var max_height = 400;
var reader = new FileReader();
reader.onload = function() {
var tmpImg = new Image();
tmpImg.src = reader.result;
@geedelur
geedelur / summernote_show_hide_toolbar.js
Last active March 12, 2019 23:47
show/hide summernote toolbar
function summernoteLoad() {
var $summernoteTextAreas = $('[data-control="summernote"]');
//cargar summernote
$summernoteTextAreas.summernote({
onImageUpload: summernoteOnImageUpload,
onkeyup: function() {
syncSummernoteTextArea($summernoteTextAreas);
validate(false);
},
onblur: function() {
// -----------
// Debugger that shows view port size. Helps when making responsive designs.
// -----------
function showViewPortSize(display) {
if(display) {
var height = jQuery(window).height();
var width = jQuery(window).width();
jQuery('body').prepend('<div id="viewportsize" style="z-index:9999;position:fixed;top:40px;left:5px;color:#fff;background:#000;padding:10px">Height: '+height+'<br>Width: '+width+'</div>');
jQuery(window).resize(function() {