Skip to content

Instantly share code, notes, and snippets.

View fhbash's full-sized avatar

Fellipe Henrique fhbash

View GitHub Profile
@fhbash
fhbash / fix-cedilla-compose.sh
Created August 1, 2025 13:47
Simple script to configure Cedilla on Gnome/KDE
#!/bin/bash
#
# fix-cedilla
#
# This is a very simple script to configure your personal ".XCompose" file and
# your environment so that typing 'c will generate a cedilla c instead of an
# accented c.
#
# For further information, visit:
# https://gist.github.com/fhbash/8f8abe491e0bcd78d6af60a48a714e47

Disable Device Enrollment Program (DEP) notification on macOS Monterey.md

With full reinstall (recommended)

   a. Boot into recovery using command-R during reboot, wipe the harddrive using Disk Utility, and select reinstall macOS

   b. Initial installation will run for approximately 1 hour, and reboot once

   c. It will then show a remaining time of about 10-15 minutes

@fhbash
fhbash / Get_Splunk_for_Centos.sh
Created September 3, 2021 16:30
HOW-TO install Splunk on RedHat or Centos
#!/bin/sh
setenforce 0
sed -i s/SELINUX=enforcing/SELINUX=disabled/g /etc/selinux/config
hostnamectl set-hostname splunk
yum -y install wget mlocate
useradd splunk -G wheel -m -d /opt/splunk -s /bin/bash
echo -e "\$plunk1\n\$plunk1" | passwd splunk
mkdir /opt/splunk /opt/installers
# .bashrc
# Source global definitions
if [ -f /etc/bashrc ]; then
. /etc/bashrc
fi
# Uncomment the following line if you don't like systemctl's auto-paging feature:
# export SYSTEMD_PAGER=
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.myProject"
version="1.0.13"
android-versionCode="13"
ios-CFBundleVersion="1.0.13"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0">
<name>SoOfertas</name>
<description>
Aplicativo de Busca de Ofertas das Cidades
@fhbash
fhbash / copy-from-time-machine.sh
Created September 1, 2017 17:12 — forked from vjt/copy-from-time-machine.sh
Copy data from a Time Machine volume mounted on a Linux box.
#!/bin/bash
#
# Copy data from a Time Machine volume mounted on a Linux box.
#
# Usage: copy-from-time-machine.sh <source> <target>
#
# source: the source directory inside a time machine backup
# target: the target directory in which to copy the reconstructed
# directory trees. Created if it does not exists.
#
myAppMobile.angular.controller('filtroController', ['$rootScope', '$scope', '$http', '$location', '$window',
function ($rootScope, $scope, $http, $location, $window) {
$scope.banners_loaded = false;
$scope.detalhes_loaded = false;
$scope.show_subcat_list = false;
$scope.filtro_desc = $rootScope.soofertas_filtro_desc;
$scope.filtro_path = $rootScope.soofertas_filtro_path;
import json
import requests
data = {
"description": "ALTO ALEGRE DOS PARECIS",
}
url = "http://localhost:8000/api/resource/ToDo"
res = requests.post(url= url, data='data'+json.dumps(data), headers={'Content-type': 'application/json'})
frappe.require("assets/webconflex/js/jquery_mask/jquery_mask.js");
frappe.ui.form.on("Contato", "onload", function (frm) {
frappe.meta.get_field('Contato', 'cpf').on_make = function (control) {
$(control.input).mask('000.000.000-00');
}
});
@fhbash
fhbash / views.py
Created November 22, 2013 13:23
View com problemas no FK
def edita_produto(request, produto_id=None):
vtop_title = 'Incluindo/Editando Produtos'
if produto_id:
v_produto = Produto.objects.get(pk=produto_id)
else:
v_produto = None
itens_composicao = inlineformset_factory(Produto, Produto_composicao, form=Composicao_ProdutoForm, can_delete=False, extra=0, fk_name='produto')