Skip to content

Instantly share code, notes, and snippets.

View lorens247's full-sized avatar

Lawrence Ikhidero lorens247

View GitHub Profile
A simple script to streamline the process of adding changes, committing them with a message and pushing to your Git repository.
Here's a basic script in Bash that accomplishes this:
### Bash Script
1. Create a new file named `git-commit-push.sh`.
2. Add the following content to the file:
```
@lorens247
lorens247 / gist:46ab6d65912976f55bac79c9ba01cafa
Created May 31, 2024 11:42
Ubuntu 24.04 Bluetooth Issues (Not Connecting To Bluetooth Device)
### Hard Refresh
## End Service (If it is running)
sudo systemctl stop bluetooth.service
## Removes Hardware Emulation
sudo systemctl unmask bluetooth.service
## Start Service
sudo systemctl start bluetooth.service
@lorens247
lorens247 / index.php
Created January 30, 2024 11:27 — forked from ingeniousambivert/index.php
Custom XAMPP Landing Page with useful links
<html>
<head>
<title>XAMPP Home</title>
</head>
<style type="text/css">
body {
background: #fcfcfc;
color: #111;
Create an account on GitHub.
Step 1 - Create a Personal Access Token on Github
To have access to your repositories and authenticate yourself, you need to create a Personal Access Token on Github.
Step 2 - Clone using personal token
git clone https://{YOUR_PERSONAL_TOKEN}@github.com/{YOUR_USERNAME}/repo.git
Step 3 - Update your git identity
git config --global user.email "lawrence@ikhidero.com"
@lorens247
lorens247 / clean.sh
Created November 17, 2022 03:04 — forked from Iman/clean.sh
Free up disk space on Ubuntu - clean log, cache, archive packages/apt archives, orphaned packages, old kernel and remove the trash
#!/bin/sh
#Check the Drive Space Used by Cached Files
du -sh /var/cache/apt/archives
#Clean all the log file
#for logs in `find /var/log -type f`; do > $logs; done
logs=`find /var/log -type f`
for i in $logs
/**
* Returns a user meta value
* Usage [um_user user_id="" meta_key="" ] // leave user_id empty if you want to retrive the current user's meta value.
* meta_key is the field name that you've set in the UM form builder
* You can modify the return meta_value with filter hook 'um_user_shortcode_filter__{$meta_key}'
*/
function um_user_shortcode( $atts ) {
$atts = extract( shortcode_atts( array(
'user_id' => get_current_user_id(),
'meta_key' => '',
@lorens247
lorens247 / macbook_pro_ubuntu_install.md
Last active June 17, 2024 16:17 — forked from cjonesy/macbook_pro_ubuntu_install.md
Installing Pop OS on MacBook Pro

Macbook Pro - Ubuntu Install

Requirements

2 USB drives > 2GB. I used an 8GB SD card

Pre-Install

Create bootable USB drive

  1. Grab the latest Ubuntu Desktop iso image