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
| import React, {useState} from 'react'; | |
| import {GoogleAPI, GoogleApiWrapper, Map, Marker} from 'google-maps-react' | |
| import {render} from "react-dom"; | |
| interface MapContainerProps { | |
| google: GoogleAPI; | |
| } | |
| type MarkerEntry = { key: string, title: string, name: string, position: { lat: number, lng: number } }; | |
| const markers: MarkerEntry[] = [ |
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
| Mono<GeocodingResponseDto> personalAddressGeo = bundle.getGeocodingClient().getGeocoding(URLEncoder.encode(requestDTO.getPersonalAddress().getFirstLine(), StandardCharsets.UTF_8.toString()), apiKey); | |
| Mono<GeocodingResponseDto> companyAddressGeo = bundle.getGeocodingClient().getGeocoding(URLEncoder.encode(requestDTO.getCompanyAddress().getFirstLine(), StandardCharsets.UTF_8.toString()), apiKey); | |
| return personalAddressGeo | |
| .subscribeOn(Schedulers.immediate()) | |
| .flatMap(this::handleNotFound) | |
| .doOnNext(x -> { | |
| requestDTO.getPersonalAddress().setLat(x.getLocation().getLat()); | |
| requestDTO.getPersonalAddress().setLon(x.getLocation().getLon()); | |
| }) |
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
| import com.moowork.gradle.node.yarn.YarnTask | |
| /* | |
| * This file was generated by the Gradle 'init' task. | |
| */ | |
| buildscript { | |
| repositories { | |
| mavenCentral() | |
| jcenter() |
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
| TEMP_VAR=$(cat <<'END_HEREDOC' | |
| export VAR1="something" | |
| export VAR2="something" | |
| END_HEREDOC | |
| ) | |
| bash -c "${TEMP_VAR}" |
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
| package com.davide; | |
| /* | |
| # funzione sommabit: effettua somme di bit ricorsivamente. Vuole in input: il primo numero da sommare, il secondo numero da sommare, il riporto al passo precedente e la posizione a cui stiamo sommando | |
| def sommabit(a, b, riportoprecedente, posizione): | |
| if posizione == 0: | |
| s = (not (a) and b) or (a and not (b)) | |
| r = a and b |
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
| #!/usr/bin/env zsh | |
| export PATH=$PATH:/usr/local/bin:~/.nvm/versions/node/"$(node -v | grep -o '[^v]'| tr -d '\n')"/bin | |
| node "$@" |
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
| import { inject, injectable } from 'inversify'; | |
| import { MongoDBClient } from '../utils/mongodb/client'; | |
| import { User } from '../models/user'; | |
| import TYPES from '../constant/types'; | |
| @injectable() | |
| export class GenericService<T extends GenericEntity> { | |
| private mongoClient: MongoDBClient; | |
| constructor( |
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
| #!/usr/bin/env bash | |
| sfolder="~/" | |
| dfolder="/Applications/" | |
| usage() { echo "Usage: $0 [-s <source folder>] [-d <destination folder>]" 1>&2; exit 1; } | |
| while getopts ":s:d:" o; do | |
| case "${o}" in | |
| s) | |
| s=${OPTARG} |
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
| package com.davidepugliese.springfood.models; | |
| import lombok.Data; | |
| import lombok.Getter; | |
| import lombok.Setter; | |
| import lombok.ToString; | |
| import javax.persistence.*; | |
| import java.util.*; |
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
| Example 1 | |
| socat TCP4-LISTEN:5010,reuseaddr,fork PROXY:109.185.139.177:www.zerohedge.com:80,proxyport=65103 | |
| In our case | |
| ping www.zerohedge.com |