Skip to content

Instantly share code, notes, and snippets.

View ederrafo's full-sized avatar

Eder Rafo Jose Pariwana Espinhal ederrafo

View GitHub Profile
@ederrafo
ederrafo / git branch.md
Last active March 11, 2025 23:09
git branch

Find branches the commit is on

This will tell you all branches which have the given commit in their history. Obviously this is less useful if the commit's already been merged.

$ git branch --contains <commit>

To delete branchs

Branch Local

@ederrafo
ederrafo / git config.md
Last active November 28, 2021 01:45
git config

git-diff to ignore ^M

git-diff to ignore ^M In a project(to me happened in so win, even on diferents virtual machines :S ), something appear this caracters ^M in our scripts, for example java https://help.github.com/en/github/using-git/configuring-git-to-handle-line-endings Github suggest use the \n for end line, that you should make sure to only use \n as a newline character in git-handled repos. There's an option to auto-convert:

 $ git config --global core.autocrlf true

Laravel 5 use Validator;

$validator = Validator::make($request->all(), [ 'from' => 'required', 'to' => 'required', 'function' => 'required', 'name' => 'required', ]);

@ederrafo
ederrafo / laravel-utils.md
Created August 1, 2019 16:49
laravel php

$ php artisan --version Laravel Framework 5.5.43 $request = new \Illuminate\Http\Request(); $request->eder = 'rafo';

@ederrafo
ederrafo / jquery various
Last active July 4, 2019 19:21
jquery various javascript
// event modal bootstrap 3
$('#crear-gestion-de-cobranza').on('show.bs.modal', function (event) {
event.preventDefault;
console.log('Logica para crear una gestion de cobranza')
// AccountsPrepare()
// AccountsPaint();
});
@ederrafo
ederrafo / ubuntu-install-kazam-recordscreen
Created June 24, 2019 03:25
ubuntu debian linux kazam record screen
$ apt-cache search kazam
$ apt-cache policy kazam
$ sudo apt-get -y install kazam
In operation system is installed:
modified: etc/ld.so.cache
modified: usr/share/icons/hicolor/icon-theme.cache
Added:
etc/vdpau_wrapper.cfg
@ederrafo
ederrafo / ubuntu-unknow-filesystem-exfat
Created June 24, 2019 02:58
ubuntu linux debian error
This message:
Error mounting /dev/sdb1 at /media/ederrafo/My Passport:
unknow filesystem type 'exfat'
Solution
Sometimes pendrive are formatted with extfat. The problem occurs because exfat-fuse package is missing in your operation system.
$ ls /usr/bin/ | wc -l
$ sudo apt-get install exfat-fuse exfat-utils
In operation system is installed:
@ederrafo
ederrafo / ubuntu-initial-so
Last active June 23, 2019 23:04
ubuntu linux
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.2 LTS
Release: 18.04
Codename: bionic
$ ls /usr/bin/ | wc -l
1499
$ sudo apt-get update
$ sudo apt-get -y install git
@ederrafo
ederrafo / CodeIgniter
Created May 16, 2019 20:09
php codeigniter framework
# Check version of CodeIgniter
$ cat system/core/CodeIgniter.php | grep CI_VERSION
@ederrafo
ederrafo / read-json-file.php
Last active July 18, 2021 20:32
php read json file
<?php
$string = trim(file_get_contents(dirname(__FILE__) . "/response.json"));
// Remove utf8 sequence
$bom = pack('H*','EFBBBF');
$string = preg_replace("/^$bom/", '', $string);
$data = json_decode($string);