Skip to content

Instantly share code, notes, and snippets.

View GabrielCzar's full-sized avatar
🥋

Gabriel César GabrielCzar

🥋
View GitHub Profile
@GabrielCzar
GabrielCzar / prepare-commit-msg
Last active July 26, 2023 04:48
Git hook prepare-commit-msg to append Jira id into the commit message
#!/bin/sh
# prevents the display of color codes on colorless consoles
if test -t 1; then
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[0;33m'
BOLD='\e[01m'
RESET='\033[0m'
fi
@GabrielCzar
GabrielCzar / responsive-iframe.html
Last active November 7, 2018 00:13
Simple css to create an iframe responsive
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<style>
@GabrielCzar
GabrielCzar / DOCKER_COMPOSE.md
Last active March 16, 2024 21:42
Docker compose samples

Scripts to run specific services

@GabrielCzar
GabrielCzar / cards.html
Last active February 16, 2019 17:23
Materialize Card Dashboard => Insert the index.html raw link and css raw link in this site: https://gabrielczar.github.io/render-gist/
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Materialize - Dash</title>
<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">
@GabrielCzar
GabrielCzar / job-salary-prediction.ipynb
Last active June 25, 2018 03:36
Trabalho Final de Machine Learning - Salary Prediction any UK Job Ad Based
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@GabrielCzar
GabrielCzar / new-columns.md
Last active May 27, 2018 00:34
Criando novas colunas a partir de uma com pandas
  • Entrada
id Location
0 UK ~ London~East London ~ Mile End
1 UK ~ London~East London ~ Shadwe
  • Comando:
XlocTree = pd.DataFrame(df_location_tree.rel.str.split('~', 3).tolist(), columns = ['ABBR','City','Region', 'Local'])
@GabrielCzar
GabrielCzar / AndroidManifest.xml
Last active May 12, 2018 14:33
Location Service Kotlin Android With Permissions Dispatcher and RX Location Manager
<!-- Only permissions necessary -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-feature android:name="android.hardware.location.gps" />
<!-- Inside application tag -->
<service android:name=".LocationService"/>
@GabrielCzar
GabrielCzar / basic-react-login-spring.jsx
Last active December 10, 2021 01:01
Authentication - React - Spring Security
import React, { Component } from 'react';
import logo from './logo.svg';
import './App.css';
import axios from 'axios';
const BASE_URL = 'http://localhost:8080/api';
class App extends Component {
constructor(props) {
super(props);
public String get(String filename) throws IOException {
Path root = Paths.get("data");
Stream<Path> other = Files.walk(root, 3).filter(path -> !path.equals(root)).map(root::relativize);
List<Path> paths = (other.collect(Collectors.toList()));
System.out.println(paths);
for (Path path: paths)
if (path.toString().matches("^[A-z\\/]*" + filename))
curl -X POST https://overpass-api.de/api/interpreter -H "Content-Type: application/x-www-form-urlencoded" -d "data=[out:json];node ++[amenity] ++(39.83385008019448,114.3896484375,40.6723059714534,118.5369873046875); out;"