Skip to content

Instantly share code, notes, and snippets.

😶
Doing stuff..

Jaume Tarradas Llort bichotll

😶
Doing stuff..
Block or report user

Report or block bichotll

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@bichotll
bichotll / zoomCalc.js
Created Nov 9, 2018
zoom calculation from lat, long and km scuare
View zoomCalc.js
function calcLong(lat, long, distance) {
var earth = 6378.137, //radius of the earth in kilometer
pi = Math.PI,
cos = Math.cos,
m = (1 / ((2 * pi / 360) * earth)) / 1000; //1 meter in degree
return long + (distance * m) / cos(lat * (pi / 180));
}
function calcLat(lat, long, distance) {
@bichotll
bichotll / pull-request.md
Last active Oct 9, 2018
How to work properly with Git
View pull-request.md

How to work nicely and sound with Git (Gitlab/Github):

1 - Let's get our local updated before everything git fetch --all

2 - Now we start a new branch (from master!) git checkout origin/master (or git checkout upstream/master or similar depending on your setup) and git checkout -b feature-a

@bichotll
bichotll / update-all-git-repos.sh
Created Apr 3, 2018
update all git repos in a directory
View update-all-git-repos.sh
ls | xargs -I{} git -C {} pull
View start-case.js
_.replace(params[0], /(^[a-zA-Z])|(\.[a-zA-Z]\.)|((\[|\(\ )[a-zA-Z])/g, _.toUpper)
@bichotll
bichotll / package.json
Last active May 23, 2017
Proxy modifying and setting up permissive headers
View package.json
{
"name": "web-proxy",
"version": "1.0.0",
"description": "",
"main": "index.js",
"dependencies": {
"http-proxy": "^1.16.2"
},
"devDependencies": {},
"scripts": {
@bichotll
bichotll / SassMeister-input.scss
Last active Apr 3, 2017
Proper at-root on multiple elements - Generated by SassMeister.com.
View SassMeister-input.scss
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
.parent {
&:hover,
&:focus,
&:active {
.child {
View gist:e54c01501ecba5c19252b93ea98398e4
function changeHandler(e) {
console.log('fullscreen');
document.webkitCancelFullScreen()
//document.documentElement.webkitRequestFullScreen();
}
document.addEventListener("fullscreenchange", changeHandler, false);
document.addEventListener("webkitfullscreenchange", changeHandler, false);
document.addEventListener("mozfullscreenchange", changeHandler, false);
@bichotll
bichotll / index.html
Last active Jan 6, 2017 — forked from anonymous/index.html
Keypress.js bug testing - JS Bin// source http://jsbin.com/xajipev
View index.html
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src="http://cdn.rawgit.com/dmauro/Keypress/master/keypress.js"></script>
<script src="https://code.jquery.com/jquery-3.1.0.js"></script>
</head>
<body>
You can’t perform that action at this time.