Skip to content

Instantly share code, notes, and snippets.

View plopezbarbosa's full-sized avatar
🎯
Focusing

Pierre López Barbosa plopezbarbosa

🎯
Focusing
View GitHub Profile
@dev4jam
dev4jam / network_service.dart
Created March 21, 2022 06:57
Full source code of the Network Service
import 'package:freezed_annotation/freezed_annotation.dart';
import 'dart:io';
part 'NetworkRequestBody.freezed.dart';
part 'NetworkResponse.freezed.dart';
class AccessTokenResponse {
String? accessToken;
AccessTokenResponse.fromJson(Map<String, dynamic> json) {
accessToken = json['access_token'];
@zhangshine
zhangshine / tinymce-react-nextjs.md
Last active November 23, 2024 15:22
NextJs- React - Self hosted TinyMCE
  1. Install (TinyMCE 5.x)
npm install --save tinymce @tinymce/tinymce-react copy-webpack-plugin
  1. Copy static files(tinymce skins) to public folder. Edit file next.config.js
const path = require('path');
const webpack = require('webpack');
const CopyPlugin = require('copy-webpack-plugin');
@aagarwal1012
aagarwal1012 / flutter-ci.yml
Last active October 20, 2025 09:21
CI for your Flutter apps on GitHub Actions.
name: Flutter CI
# This workflow is triggered on pushes to the repository.
on:
push:
branches:
- master
# on: push # Default will running for every branch.
@hurelhuyag
hurelhuyag / Main.java
Last active August 6, 2022 19:22
Bixolon printer using from java
package net.hh.bixolondemo2;
import jpos.JposException;
import jpos.POSPrinter;
import jpos.POSPrinterConst;
import jpos.events.StatusUpdateEvent;
import jpos.events.StatusUpdateListener;
import javax.swing.*;
import java.io.IOException;
@rahulbagal
rahulbagal / dart.password.check
Created April 26, 2019 11:53
Dart : How to check if password contains all required characters
# Dart: Validate Password
This code snippet shows how to validate a password
**Requirement** :
Password should be more than 8 characters long
It should contain
at least one Uppercase ( Capital ) letter
at least one lowercase character
at least digit and
special character.
@denisviana
denisviana / firebase_provider.dart
Created April 19, 2019 23:23
Flutter + Firebase + BLoC (Recover Password)
import 'dart:async';
import 'dart:io';
import 'package:firebase_storage/firebase_storage.dart';
import 'package:firebase_auth/firebase_auth.dart';
import 'package:cloud_firestore/cloud_firestore.dart';
import 'package:hotaru_car/src/models/car_ad.dart';
import 'package:hotaru_car/src/models/collections_mapper.dart';
import 'package:hotaru_car/src/models/response/user_response.dart';
import 'package:hotaru_car/src/models/user.dart';
@hendrawd
hendrawd / OkHttp3Stack.java
Last active October 15, 2019 22:56
latest volley singleton
import com.android.volley.Request;
import com.android.volley.error.AuthFailureError;
import com.android.volley.toolbox.HttpStack;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.ProtocolVersion;
import org.apache.http.StatusLine;
import org.apache.http.entity.BasicHttpEntity;
import org.apache.http.message.BasicHeader;
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active January 1, 2026 20:52
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@candostdagdeviren
candostdagdeviren / .swiftlint.yml
Last active November 20, 2025 09:41
Sample SwiftLint file to apply best practices
disabled_rules: # rule identifiers to exclude from running
- variable_name
- nesting
- function_parameter_count
opt_in_rules: # some rules are only opt-in
- control_statement
- empty_count
- trailing_newline
- colon
- comma
@jecyhw
jecyhw / AjaxAwareAuthenticationEntryPoint.java
Last active February 10, 2022 05:59
spring boot ajax session timeout
public class AjaxAwareAuthenticationEntryPoint extends LoginUrlAuthenticationEntryPoint {
public AjaxAwareAuthenticationEntryPoint(String loginFormUrl) {
super(loginFormUrl);
}
@Override
public void commence(HttpServletRequest request, HttpServletResponse response, AuthenticationException authException) throws IOException, ServletException {
String ajaxHeader = ((HttpServletRequest) request).getHeader("X-Requested-With");
if ("XMLHttpRequest".equals(ajaxHeader)) {
response.sendError(HttpServletResponse.SC_FORBIDDEN, "Ajax Request Denied (Session Expired)");