Skip to content

Instantly share code, notes, and snippets.

@romeugodoi
romeugodoi / GeoDistance.php
Created April 18, 2023 13:52
This routine calculates the distance between two points (latitude/longitude)
<?php
/*::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::*/
/*:: :*/
/*:: This routine calculates the distance between two points (given the :*/
/*:: latitude/longitude of those points). It is being used to calculate :*/
/*:: the distance between two locations using GeoDataSource(TM) Products :*/
/*:: :*/
/*:: Definitions: :*/
/*:: South latitudes are negative, east longitudes are positive :*/
@croblesm
croblesm / Dockerfile
Last active December 7, 2021 18:14
msql-tools custom image using Alpine
# SQL Server Command Line Tools - custom image
# From Alpine 3.11 (~5 MBs)
FROM alpine:3.11
LABEL maintainer="@dbamastery"
# Installing system utilities
RUN apk add --no-cache curl gnupg
# Adding custom MS repository for mssql-tools and msodbcsql
RUN curl -O https://download.microsoft.com/download/e/4/e/e4e67866-dffd-428c-aac7-8d28ddafb39b/msodbcsql17_17.5.2.1-1_amd64.apk
@butschster
butschster / dbdiagram-builder.php
Created January 14, 2020 20:15
Database diagram builder for https://dbdiagram.io/
<?php
namespace App\Console\Commands;
use Doctrine\DBAL\Schema\AbstractSchemaManager;
use Illuminate\Console\Command;
use Illuminate\Database\ConnectionInterface;
use Illuminate\Support\Arr;
class BuildDatabaseSchemaDiagramCommand extends Command
@nicolasdao
nicolasdao / elasticbeanstalk_guide.md
Last active December 11, 2023 14:40
Elastic Beanstalk guide. Keywords: elastic bean beanstalk elasticbeanstalk cli eb eb
@diego3g
diego3g / settings.json
Last active June 30, 2024 01:04
VSCode Settings (Updated)
{
"workbench.startupEditor": "newUntitledFile",
"editor.fontSize": 14,
"editor.lineHeight": 1.8,
"javascript.suggest.autoImports": true,
"javascript.updateImportsOnFileMove.enabled": "always",
"editor.rulers": [80, 120],
"extensions.ignoreRecommendations": true,
"typescript.tsserver.log": "off",
"files.associations": {
@vincentchalamon
vincentchalamon / GeocodingFilter.php
Created April 7, 2019 10:13
GeocodingFilter for ApiPlatform 2.3
<?php
/*
* This file is part of the Zero Dechet project.
*
* (c) Vincent Chalamon <vincentchalamon@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
@axelvnk
axelvnk / OrSearchFilter.php
Last active June 9, 2024 15:20
Api platform OR search filter
<?php
namespace Axelvkn\AppBundle\Filter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Filter\SearchFilter;
use ApiPlatform\Core\Bridge\Doctrine\Orm\Util\QueryNameGeneratorInterface;
use ApiPlatform\Core\Exception\InvalidArgumentException;
use Doctrine\ORM\QueryBuilder;
class OrSearchFilter extends SearchFilter
@luisjuniorj
luisjuniorj / Fibo_Bands
Created January 4, 2018 09:20
ProfitChart Pro - Indicador com mais de 4 linhas
input
plen(17);
fast(0.666);
slow(0645);
var
mTrueRange : float;
Oval : Float;
Hval : Float;
@akexorcist
akexorcist / index.js
Last active November 17, 2022 11:25
Axios post method requesting with x-www-form-urlencoded content type. See https://axios-http.com/docs/urlencoded
const axios = require('axios')
/* ... */
const params = new URLSearchParams()
params.append('name', 'Akexorcist')
params.append('age', '28')
params.append('position', 'Android Developer')
params.append('description', 'birthdate=25-12-1989&favourite=coding%20coding%20and%20coding&company=Nextzy%20Technologies&website=http://www.akexorcist.com/')
params.append('awesome', true)
@480
480 / gist:3b41f449686a089f34edb45d00672f28
Last active June 27, 2024 06:21
MacOS X + oh my zsh + powerline fonts + visual studio code terminal settings

MacOS X + oh my zsh + powerline fonts + visual studio code (vscode) terminal settings

Thank you everybody, Your comments makes it better

Install oh my zsh

http://ohmyz.sh/

sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"