Skip to content

Instantly share code, notes, and snippets.

View basamoahjnr's full-sized avatar
🎯
Focusing

basamoahjnr

🎯
Focusing
  • yasobafinibus.com
  • Cedar City
View GitHub Profile
@basamoahjnr
basamoahjnr / install_asterisk16.sh
Created July 27, 2019 12:03
Asterisk16 CentOS Install
sudo yum upgrade -y
sudo yum -y install yum-plugin-fastestmirror
sudo rpm --import https://www.elrepo.org/RPM-GPG-KEY-elrepo.org
sudo rpm -Uvh http://www.elrepo.org/elrepo-release-7.0-2.el7.elrepo.noarch.rpm
sudo yum --enablerepo=elrepo-kernel install kernel-lt -y
sudo yum --enablerepo=elrepo-kernel -y swap kernel-headers -- kernel-lt-header -y
sudo yum --enablerepo=elrepo-kernel -y swap kernel-tools-libs -- kernel-lt-tools-libs -y
package com.matrix.calculator;
import java.io.*;
import java.util.Scanner;
public class Calculator {
public static void main(String[] args) {
// write your code here
@basamoahjnr
basamoahjnr / pjsip_wizard.conf
Last active June 3, 2023 12:05
sample pjsip_wizard configuration file
[user_defaults](!)
type = wizard
transport = transport-ipv4
accepts_registrations = yes
sends_registrations = no
accepts_auth = yes
sends_auth = no
has_hint = yes
hint_context = internal
endpoint/context = internal
@basamoahjnr
basamoahjnr / app.js
Created April 11, 2021 12:24 — forked from Gofilord/app.js
Sending a mail via ajax with a captcha
$('#submit').click(function(e) {
// e.preventDefault();
console.log('clicked submit');
var $errors = $('#errors'),
$status = $('#status'),
name = $('#name').val().replace(/<|>/g, ""), // no xss
email = $('#email').val().replace(/<|>/g, ""),
msg = $('#message').val().replace(/<|>/g, "");
@basamoahjnr
basamoahjnr / rhel7-moodle.sh
Created September 14, 2021 19:53 — forked from mrverrall/rhel7-moodle.sh
A script that installs and configures all the core components for moodle on RHEL/Centos 7 leaving you with a running site complete with AV scanning and Memcached
#!/bin/bash
#
# This Bash script installs Moodle (http://moodle.org) and all it's
# requirements into a freshly installed Centos or RHEL 7 operating system.
# It assumes an 'Enforced' SELinux environment and configures the system
# accordingly.
#
# It is designed to be instructional and clear to read to persons unfamiliar
# with Bash and as such does *no* sanity checking before taking actions.
# Becasue of this *great* care should be taken if you feel the urge to run