Skip to content

Instantly share code, notes, and snippets.

// -----------
// 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() {
@geedelur
geedelur / conemu_settings.xml
Last active August 29, 2015 14:03
my super sexy conemu settings
<?xml version="1.0" encoding="utf-8"?>
<key name="Software">
<key name="ConEmu">
<key name=".Vanilla" modified="2014-10-25 14:51:09" build="140903">
<value name="ColorTable00" type="dword" data="00222827"/>
<value name="ColorTable01" type="dword" data="009e5401"/>
<value name="ColorTable02" type="dword" data="0004aa74"/>
<value name="ColorTable03" type="dword" data="00a6831a"/>
<value name="ColorTable04" type="dword" data="003403a7"/>
<value name="ColorTable05" type="dword" data="009c5689"/>
@geedelur
geedelur / boxstarter.ps1
Last active August 29, 2015 14:08
Automated Windows devbox installation using Boxstarter
# http://boxstarter.org/package/url?https://gist.github.com/geedelur/3cdb2a077c1e74213b1a
### windows configs ###
Set-ExplorerOptions -showFileExtensions -EnableShowFullPathInTitleBar
### basic stuff ###
cinst 7zip
cinst notepad2
cinst sumatrapdf
cinst dropbox
#!/bin/bash
# Binaries
binaries=(
autossh
wget
coreutils # GNU core utilities (those that come with OS X are outdated)
findutils # GNU `find`, `locate`, `updatedb`, and `xargs`, g-prefixed
)
@geedelur
geedelur / ubuntu12server_mate.textile
Created July 30, 2012 16:18
Ubuntu Server 12.04 + MATE + LightDM
@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 / com.googlecode.iterm2.plist
Last active February 21, 2016 20:19
iterm2 preferences
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>AdjustWindowForFontSizeChange</key>
<true/>
<key>AllowClipboardAccess</key>
<false/>
<key>AnimateDimming</key>
<false/>