Skip to content

Instantly share code, notes, and snippets.

View fontenele's full-sized avatar

Guilherme Fontenele fontenele

View GitHub Profile
@fontenele
fontenele / gist:6db10991df6d497664a79d3b16aa1d2d
Created June 21, 2020 18:23
Workaround for unresponsive keyboard on Ubuntu 20.04
1. Go to IDE "Help | Edit Custom VM options..."
2. Add -Drecreate.x11.input.method=true to a new line
3. Restart IDE
from (Jetbains issue)[https://youtrack.jetbrains.com/issue/IDEA-23472]
@fontenele
fontenele / composer.json
Created September 2, 2019 04:55
Laravel Debug Helper fixed in Chrome DevTools
"autoload": {
"files": [
"helpers.php"
]
},
@fontenele
fontenele / Envoy.blade.php
Created September 6, 2018 00:49 — forked from walkeralencar/Envoy.blade.php
Envoy.blade.php
{{-- Define all our servers --}}
@servers(['staging' => '', 'production' => ''])
@setup
{{-- The timezone your servers run in --}}
$timezone = 'Europe/Amsterdam';
{{-- The base path where your deployments are sitting --}}
$path = '/var/www/site.com/htdocs';
@fontenele
fontenele / Install_React_Native_Android_on_Ubuntu.md
Created August 29, 2018 17:36 — forked from eon01/Install_React_Native_Android_on_Ubuntu.md
Steps for getting a working Linux install for React Native Android

Installing React Native Android on Ubuntu

Here are the steps for getting a working Linux install for React Native:

  1. Install Java SDK
  1. Install KVM
    • sudo apt-get install qemu-kvm libvirt-bin bridge-utils virt-manager
    • sudo adduser $USER libvirtd
<?php
use Swagger\Annotations as SWG;
/**
* @SWG\Swagger(
* basePath="/v1",
* host="api.local",
* schemes={"http"},
* produces={"application/json"},
@fontenele
fontenele / simple-pagination.js
Created February 21, 2018 22:15 — forked from kottenator/simple-pagination.js
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;
@fontenele
fontenele / Function.Array-Group-By.php
Created February 8, 2018 17:15 — forked from mcaskill/Function.Array-Group-By.php
PHP : Groups an array by a given key
<?php
if (!function_exists('array_group_by')) {
/**
* Groups an array by a given key.
*
* Groups an array into arrays by a given key, or set of keys, shared between all array members.
*
* Based on {@author Jake Zatecky}'s {@link https://github.com/jakezatecky/array_group_by array_group_by()} function.
* This variant allows $key to be closures.
@fontenele
fontenele / addAttendee.php
Created December 28, 2017 14:12 — forked from AFelipeTrujillo/addAttendee.php
Use Google Calendar API
<?php
include_once 'google-api-php-client/vendor/autoload.php';
$client = new Google_Client();
$application_creds = 'service-account-credentials.json';
$credentials_file = file_exists($application_creds) ? $application_creds : false;
define("SCOPE",Google_Service_Calendar::CALENDAR);
define("APP_NAME","Google Calendar API PHP");
https://www.axllent.org/docs/view/nodejs-service-with-systemd/
@fontenele
fontenele / ie67891011-css-hacks.txt
Created July 29, 2016 19:43 — forked from ricardozea/ie67891011-css-hacks.txt
IE CSS hacks - IE6, 7, 8, 9, 10, 11
IE6 Only
==================
_selector {...}
IE6 & IE7
==================
*html or { _property: }
IE7 Only
==================