This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Be careful when changing Object's prototype to avoid overwriting of methods | |
if (Object.prototype.setPath === undefined && Object.prototype.getPath === undefined) { | |
Object.prototype.setPath = function (path, value, notation) { | |
function isObject(obj) { return (Object.prototype.toString.call(obj) === '[object Object]' && !!obj);} | |
notation = notation || '.'; | |
path.split(notation).reduce(function (prev, cur, idx, arr) { | |
var isLast = (idx === arr.length - 1); | |
// if <cur> is last part of path | |
if (isLast) return (prev[cur] = value); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
proof: http://www.heidisql.com/forum.php?t=167 | |
--------------------------------------------------------------------------------------------- | |
I just tried to connect to my MySQL using putty.. It works great... | |
First download Putty (google on putty) then create a new connection. | |
Go to "Connection -> SSH -> Tunnels" in the left part of the screen and input the following: | |
Source port: 3306 | |
Destination: localhost:3306 | |
(The radiobuttons stay on "local" and "auto") | |
Then press the "Add" button. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$('#el').bind('DOMMouseScroll mousewheel', function(e) { | |
var step = 30; | |
e.preventDefault(); | |
step *= (e.originalEvent.wheelDelta > 0) ? -1 : 1; | |
$(this).scrollLeft($(this).scrollLeft() + step); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div id="rain-container"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Solves problem between windows (host) and linux (vagrant), when there are symlinks in shared folders at linux machine. | |
With this config symlinks will search at the machine, where they were created |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// https://justmarkup.com/log/2015/07/31/dealing-with-long-words-in-css/ | |
.hyphenate { | |
overflow-wrap: break-word; | |
word-wrap: break-word; | |
-webkit-hyphens: auto; | |
-ms-hyphens: auto; | |
-moz-hyphens: auto; | |
hyphens: auto; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This script uses as a cordova hook and provides ability to add android permissions to AndroidManifest.xml on the fly. It also | |
checks and computes which of provided permissions are already added and didn't rewrite AndroidManifest.xml if no permissions provided. | |
Executes only for android platform. | |
Prerequirements: | |
- node 4.2+ | |
- npm modules: lodash, xml2js | |
Distributed under the MIT license. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.webtype.com/info/articles/fonts-weights/ | |
100 Extra Light, Ultra Light | |
200 Light or Thin | |
300 Book or Demi | |
400 Normal or Regular | |
500 Medium | |
600 Semibold, Demibold | |
700 Bold | |
800 Black, Extra Bold or Heavy | |
900 Extra Black, Fat, Poster or Ultra Black |
OlderNewer