Skip to content

Instantly share code, notes, and snippets.

View heartcode's full-sized avatar

Robert Pataki heartcode

View GitHub Profile
@heartcode
heartcode / Base File.sublime-settings
Created September 5, 2013 11:38
DocBlockr (sublime-jsdoc) user settings
{
// If set to true, primitives such as "Number" and "String" will be documented as "number" and "string".
"jsdocs_lower_case_primitives": false,
// indicates whether the @method tag should be added automatically
"jsdocs_autoadd_method_tag": true,
// Any additional boilerplate tags which should be added to each block. Should be an array of strings.
// Note that this only applies when a docblock is opened directly preceding a function.
// Tab points can be added by using snippet syntax, eg: ${1:default text}
"jsdocs_extra_tags": ["@protected"]
}
@heartcode
heartcode / jenkinz.log
Created October 17, 2013 13:43
Jenkinz app crashes, this is the console log output
14/10/2013 16:28:54.220 Evernote: -[EDAMSyncState read:]: unexpected field ID 5 with type 10. Skipping.
14/10/2013 16:28:54.535 Evernote: -[EDAMSyncState read:]: unexpected field ID 5 with type 10. Skipping.
14/10/2013 16:30:06.240 applepushserviced: <APSCourier: 0x7fe1c200eca0>: Stream error occurred for <APSTCPStream: 0x7fe1c26005f0>: The operation couldn’t be completed. Connection reset by peer
14/10/2013 16:32:07.707 applepushserviced: <APSCourier: 0x7fe1c200eca0>: Stream error occurred for <APSTCPStream: 0x7fe1c26005f0>: The operation couldn’t be completed. Connection reset by peer
14/10/2013 16:34:09.175 applepushserviced: <APSCourier: 0x7fe1c200eca0>: Stream error occurred for <APSTCPStream: 0x7fe1c26005f0>: The operation couldn’t be completed. Connection reset by peer
14/10/2013 16:36:12.655 applepushserviced: <APSCourier: 0x7fe1c200eca0>: Stream error occurred for <APSTCPStream: 0x7fe1c26005f0>: The operation couldn’t be completed. Connection reset by peer
14/10/2013 16:38:16.135 applepushserviced:
@heartcode
heartcode / snippets.js
Last active December 26, 2015 12:59
Useful set of JavaScript snippets
// Replace extra spaces with single ones and get rid of any spaces at the end and beginning of the string.
// http://stackoverflow.com/questions/6163169/replace-multiple-whitespaces-with-single-whitespace-in-javascript-string - Marku Uttula's answer
var s = " too much trailing space "
s = s.replace(/^(\s*)|(\s*)$/g, '').replace(/\s+/g, ' ');
// Determining the base font size, so that we can use em and rem units in JS
// TODO - make it foolproof and compatible with browsers, which handle `getComputedStyle()`
function getDefaultFontSize() {
var el = document.body.appendChild(document.createElement('p'));
el.innerHTML = 'size matters';
.scenes-wrapper {
background-color: red;
@include perspective(100000000px);
// @include perspective-origin(50% 50%);
margin: 0 auto;
width: 100%;
height: 100%;
}
.scenes {
position: relative;