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 / 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 /
Last active Oct 9, 2018
How to work properly with Git

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 /
Created Apr 3, 2018
update all git repos in a directory
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 / 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 / SassMeister-input.scss
Last active Apr 3, 2017
Proper at-root on multiple elements - Generated by
View SassMeister-input.scss
// ----
// Sass (v3.4.21)
// Compass (v1.0.3)
// ----
.parent {
&:active {
.child {
View gist:e54c01501ecba5c19252b93ea98398e4
function changeHandler(e) {
document.addEventListener("fullscreenchange", changeHandler, false);
document.addEventListener("webkitfullscreenchange", changeHandler, false);
document.addEventListener("mozfullscreenchange", changeHandler, false);
bichotll / index.html
Last active Jan 6, 2017 — forked from anonymous/index.html
Keypress.js bug testing - JS Bin// source
View index.html
<!DOCTYPE html>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width">
<title>JS Bin</title>
<script src=""></script>
<script src=""></script>
You can’t perform that action at this time.