Skip to content

Instantly share code, notes, and snippets.

View rafael-neri's full-sized avatar
💻
Working from home

Rafael Neri rafael-neri

💻
Working from home
View GitHub Profile
@rafael-neri
rafael-neri / script.sh
Created February 13, 2018 04:53
Convert MP3 Audio To MP4 Video With Image Thumb Background.
#!/bin/bash
# INSTALL FFMPEG BEFORE EXECUTE THIS SCRIPT
in=/path/directory/audios/
out=/path/directory/videos/
image=/path/image.png
for file in `ls $in`
do
@rafael-neri
rafael-neri / git-tag-delete-local-and-remote.sh
Created August 30, 2018 18:20 — forked from mobilemind/git-tag-delete-local-and-remote.sh
how to delete a git tag locally and remote
# delete local tag '12345'
git tag -d 12345
# delete remote tag '12345' (eg, GitHub version too)
git push origin :refs/tags/12345
# alternative approach
git push --delete origin tagName
git tag -d tagName
@rafael-neri
rafael-neri / PKGBUILD
Created February 12, 2015 21:02
PKGBUILD example to use in AUR
pkgname=kcenter
pkgver=0.0.1
pkgrel=1
pkgdesc="A system configuration for KDE"
arch=('i686' 'x86_64')
url="http://www.kaiana.com.br/"
license=('GPLv2')
depends=('python', 'python-pyqt5', 'qt5-webkit', 'python-xdg', )
source=('https://github.com/kaiana/${pkgname}/archive/${pkgver}.tar.gz')
md5sums=('6a676c12910d0ca2cd2c9a55d954fce4df385f1e')
@rafael-neri
rafael-neri / a2dp.py
Created August 20, 2019 12:39 — forked from pylover/a2dp.py
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04, 16.10 and also debian jessie, with bluez5.
#! /usr/bin/env python3.5
"""
Fixing bluetooth stereo headphone/headset problem in ubuntu 16.04 and also debian jessie, with bluez5.
Workaround for bug: https://bugs.launchpad.net/ubuntu/+source/indicator-sound/+bug/1577197
Run it with python3.5 or higher after pairing/connecting the bluetooth stereo headphone.
This will be only fixes the bluez5 problem mentioned above .
@rafael-neri
rafael-neri / changepassword.php
Created November 27, 2019 20:02 — forked from mattrude/changepassword.php
LDAP PHP Change Password Page
<?php
/**
* LDAP PHP Change Password Webpage
* @author: Matt Rude <http://mattrude.com>
* @website: http://technology.mattrude.com/2010/11/ldap-php-change-password-webpage/
*
*
* GNU GENERAL PUBLIC LICENSE
* Version 2, June 1991
@rafael-neri
rafael-neri / strong-passwords.php
Created November 6, 2019 02:54 — forked from tylerhall/strong-passwords.php
A user friendly, strong password generator PHP function.
<?PHP
// Generates a strong password of N length containing at least one lower case letter,
// one uppercase letter, one digit, and one special character. The remaining characters
// in the password are chosen at random from those four sets.
//
// The available characters in each set are user friendly - there are no ambiguous
// characters such as i, l, 1, o, 0, etc. This, coupled with the $add_dashes option,
// makes it much easier for users to manually type or speak their passwords.
//
// Note: the $add_dashes option will increase the length of the password by
@rafael-neri
rafael-neri / .gitlab-ci.yml
Created April 7, 2020 16:20 — forked from troyharvey/.gitlab-ci.yml
Deploy Google Cloud Functions: GitLab CI/CD Pipeline Config File
variables:
GCP_ZONE: us-central1-a
stages:
- npm-install
- push
npm-install:
image: node:8-alpine
stage: npm-install
@rafael-neri
rafael-neri / string_comparation.php
Created June 5, 2020 18:52
php string comparison percentage
<?php
similar_text("Hello World","Hello Peter",$percent);
echo $percent;
@rafael-neri
rafael-neri / modals.html
Created December 4, 2014 20:36
Resolve Conflicts UI Frameworks - Modal Bootstrap and Semantic
<html>
<head>
<title>Resolve Conflicts UI Frameworks</title>
<!-- styles -->
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/3.3.1/css/bootstrap.min.css" />
<link rel="stylesheet" href="//cdnjs.cloudflare.com/ajax/libs/semantic-ui/1.0.1/semantic.min.css" />
</head>
<body>
@rafael-neri
rafael-neri / install_ionic_yarn.sh
Last active April 10, 2021 09:32
Install Ionic Using Yarn on Ubuntu
# Install Node
sudo apt-get install nodejs
# Link command node
sudo ln -s /usr/bin/nodejs /usr/bin/node
# Install CURL
sudo apt-get install curl