Skip to content

Instantly share code, notes, and snippets.

View lcdsantos's full-sized avatar
🏠
Working from home

Leonardo Santos lcdsantos

🏠
Working from home
View GitHub Profile
@lcdsantos
lcdsantos / .editorconfig
Created September 14, 2016 18:38
My root EditorConfig file
# EditorConfig is awesome: http://EditorConfig.org
root = true
[*]
charset = utf-8
end_of_line = lf
indent_size = 2
indent_style = space
trim_trailing_whitespace = true
@lcdsantos
lcdsantos / email-template.html
Created September 14, 2016 18:33
HTML E-mail template
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>E-mail</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
#outlook a {
padding: 0;
@lcdsantos
lcdsantos / Default (Windows).sublime-keymap
Last active September 2, 2016 16:22
Sublime Text Keyboard shortcuts
[
{
"keys": [
"ctrl+v"
],
"command": "paste_and_indent"
},
{
"keys": [
"ctrl+shift+v"
@lcdsantos
lcdsantos / Preferences.sublime-settings
Last active September 14, 2016 12:11
Sublime Text User config
{
"always_show_minimap_viewport": true,
"atomic_save": false,
"binary_file_patterns":
[
"node_modules/*"
],
"bold_folder_labels": true,
"caret_style": "smooth",
"color_scheme": "Packages/Material Theme/schemes/Material-Theme-Darker.tmTheme",
/*
* Easing Functions - inspired from http://gizma.com/easing/
* only considering the t value for the range [0, 1] => [0, 1]
*/
EasingFunctions = {
// no easing, no acceleration
linear: function (t) { return t },
// accelerating from zero velocity
easeInQuad: function (t) { return t*t },
// decelerating to zero velocity
@lcdsantos
lcdsantos / gist:a9b273e012b9c541262b
Created April 28, 2015 16:32
Get missing parameters from triangle
// http://www.nayuki.io/page/triangle-solver-javascript
function calcTriangle(angleA, angleB, angleC, sideA, sideB, sideC) {
if (angleA == null) angleA = 180 - angleB - angleC;
if (angleB == null) angleB = 180 - angleC - angleA;
if (angleC == null) angleC = 180 - angleA - angleB;
if (angleA <= 0 || angleB <= 0 || angleC <= 0)
throw status + " - No solution";
var sinA = Math.sin(degToRad(angleA)),
@lcdsantos
lcdsantos / presets
Last active March 31, 2016 06:31
Firefox Dev Tools Responsive Design View Presets
  1. Open a new Firefox tab or window, and type about:config (If a warning message comes up, just click OK).

  2. Create a new entry devtools.responsiveUI.presets - right click and chose 'new' then 'string' - under enter the preference name type devtools.responsiveUI.presets then hit OK. When the enter string box appears simply add the presets.

  3. Restart Firefox.

Obs: It's devtools.responsiveUI.presets, not devtools.responsive.UI.presets.