Skip to content

Instantly share code, notes, and snippets.

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

Fellipe Henrique fellipeh

🏠
Working from home
View GitHub Profile

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

@fellipeh
fellipeh / 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=
@fellipeh
fellipeh / 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;
<?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
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');
}
});
#!/bin/bash
2 NAME="site1"
3 HOME_SITE=/home/ubuntu/sites
4 HOME_VENV=/home/ubuntu/.virtualenvs/$NAME
5 DJANGODIR=$HOME_SITE/$NAME/app # Django project directory
6 SOCKFILE=$HOME_SITE/$NAME/run/gunicorn.sock # we will communicte using this un$
7 LOGFILE=$HOME_SITE/$NAME/log/gunicorn.log
8 USER=ubuntu # the user to run as
9 GROUP=ubuntu # the group to run as
10 NUM_WORKERS=3 # how many worker processes should Gunicorn spawn
aquivo: site1.conf
---------------------------
upstream site1 {
server unix:/home/ubuntu/sites/site1/run/gunicorn.sock fail_timeout=0;
}
server {
listen 80;
server_name www.site1.com.br site1.com.br;