Skip to content

Instantly share code, notes, and snippets.

View ralphcrisostomo's full-sized avatar

Ralf Crisostomo ralphcrisostomo

  • Goodstuff
  • Australia
View GitHub Profile
@ralphcrisostomo
ralphcrisostomo / Windows XP.vmc
Created March 15, 2013 02:29
Windows XP VHD .vmc configuration for expiration date problem
<?xml version="1.0" encoding="UTF-16"?>
<!-- Microsoft Virtual Machine Options and Settings -->
<preferences>
<version type="string">2.0</version>
<event_logging>
<preference_change>
<enabled type="boolean">false</enabled>
</preference_change>
</event_logging>
<hardware>
[user]
name = Ralf Crisostomo
email = rrecrisostomo@gmail.com
[credential]
helper = osxkeychain
[core]
quotepath = false
excerpt : ( string, total ) ->
string = string.substring(total)
string += "..."
string
# TO USE:
# window.app.helpers.browserDetect.initialize()
# window.app.helpers.browserDetect.browser == "Safari"
# window.app.helpers.browserDetect.version == 2
"use strict";
window.app = window.app or {}
window.app.helpers = window.app.helpers or {}
.wrapper {
background-image: url("../img/bg.jpg");
background-repeat: no-repeat;
background-position: center center;
@include background-size(cover);
}
body {
font-family: Helvetica, arial, sans-serif;
font-size: 14px;
line-height: 1.6;
padding-top: 10px;
padding-bottom: 10px;
background-color: white;
padding: 30px; }
body > *:first-child {
@ralphcrisostomo
ralphcrisostomo / Console.Fix.For.All.Browser.js
Last active December 19, 2015 22:19
Avoid `console` error in browsers that lack a console.
<script type="text/javascript">
// Avoid `console` errors in browsers that lack a console.
if (!(window.console && console.log)) {
(function() {
var noop = function() {};
var methods = ['assert', 'clear', 'count', 'debug', 'dir', 'dirxml', 'error', 'exception', 'group', 'groupCollapsed', 'groupEnd', 'info', 'log', 'markTimeline', 'profile', 'profileEnd', 'markTimeline', 'table', 'time', 'timeEnd', 'timeStamp', 'trace', 'warn'];
var length = methods.length;
var console = window.console = {};
while (length--) {
console[methods[length]] = noop;
@ralphcrisostomo
ralphcrisostomo / Git.Fixed.Untracked.Files
Created July 22, 2013 09:17
Fixed untracked Git files
git rm -r --cached .
git add .
git commit -m "fixed untracked files"
@ralphcrisostomo
ralphcrisostomo / moom-settings-transfer
Created October 9, 2013 11:34
Moom Settings Transfer
# source: http://macorios.com/blog/2013-2-28-sync-moom-between-two-or-more-macs
# Copy this file to the new mac.
~/Library/Preferences/com.manytricks.Moom.plist.lockfile
# source: http://mashable.com/2013/10/23/clean-install-os-x-mavericks/
sudo /Applications/Install\ OS\ X\ Mavericks.app/Contents/Resources/createinstallmedia --volume /Volumes/Untitled --applicationpath /Applications/Install\ OS\ X\ Mavericks.app --nointeraction