Skip to content

Instantly share code, notes, and snippets.

View rrmesquita's full-sized avatar
🏠
Working from home

Rodrigo Mesquita rrmesquita

🏠
Working from home
  • Rio de Janeiro
View GitHub Profile
@michaelhue
michaelhue / BrowserTestCase.php
Created April 17, 2022 12:32
InertiaBrowser
<?php
namespace App\Tests;
use Orchestra\Testbench\Dusk\TestCase as BaseTestCase;
use App\Testing\Concerns\CreatesApplication;
use App\Testing\Concerns\ProvidesInertiaBrowser;
abstract class BrowserTestCase extends BaseTestCase
{
<?php
$form_id = 3;
add_filter( 'gform_form_post_get_meta_' . $form_id, 'add_repeater_field' );
function add_repeater_field( $form ) {
$field_id = 1000;
$fields = [
GF_Fields::create(
[
'type' => 'text',
xcode-select --install
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
brew update
brew cask install iterm2
# update iterm2 settings -> colors, keep directory open new shell, keyboard shortcuts
brew install bash # latest version of bash
# set brew bash as default shell
brew install fortune
brew install cowsay
brew install git
@stigok
stigok / githook.js
Last active July 30, 2023 09:46
Verify GitHub webhook signature header in Node.js
/*
* Verify GitHub webhook signature header in Node.js
* Written by stigok and others (see gist link for contributor comments)
* https://gist.github.com/stigok/57d075c1cf2a609cb758898c0b202428
* Licensed CC0 1.0 Universal
*/
const crypto = require('crypto')
const express = require('express')
const bodyParser = require('body-parser')
@lopspower
lopspower / README.md
Last active April 30, 2024 02:11
Hexadecimal color code for transparency

Hexadecimal color code for transparency

Twitter

How to set transparency with hex value ?

For example, you want to set 40% alpha transparence to #000000 (black color), you need to add 66 like this #66000000.

Download This sample on Google Play Store

@leymannx
leymannx / gulpfile.js
Last active July 13, 2023 15:29
Gulp Sass with autoprefixer and minify.
var gulp = require('gulp'),
sass = require('gulp-sass'),
rename = require('gulp-rename'),
cssmin = require('gulp-cssnano'),
prefix = require('gulp-autoprefixer'),
plumber = require('gulp-plumber'),
notify = require('gulp-notify'),
sassLint = require('gulp-sass-lint'),
sourcemaps = require('gulp-sourcemaps');
// Temporary solution until gulp 4
@kottenator
kottenator / simple-pagination.js
Created July 13, 2015 20:44
Simple pagination algorithm
// Implementation in ES6
function pagination(c, m) {
var current = c,
last = m,
delta = 2,
left = current - delta,
right = current + delta + 1,
range = [],
rangeWithDots = [],
l;