Skip to content

Instantly share code, notes, and snippets.

View RussQuan's full-sized avatar
👀
I'm currently looking for a remote job

YuQuan RussQuan

👀
I'm currently looking for a remote job
View GitHub Profile
@hogliux
hogliux / sms-to-telegram.md
Last active August 30, 2023 10:22
Notes on sms forwarding with huawei E8372h-320 on debian bullseye raspberry pi OS

These notes are based on ethaniel's excellent guide. Please read that guide first and then consult these notes on some changes/tweeks I needed to do to get this running on the newest raspberyr pi OS (January 2023) with a Huawei E8372h-320 (2020 model).

Setup SMS forwarding with gammu on debian bullseye on a rasp pi B+ with the HUAWEI E8372h-320 (2020 model)

First and foremost we need to get the huawei into the correct mode. Unfortunately, usb modeswitch did not do this out-of-the-box for me.

Ensuring that the huawei stick does not switch into an incompatible mode automatically

Blacklist cdc_ether by creating a file /etc/modprobe.d/blacklist-huawei-cdc-usb-net.conf with the following contents:

@ethaniel
ethaniel / sms-to-telegram.md
Last active April 9, 2024 03:44
HOWTO: Receive SMS via 4G/LTE Huawei stick on Raspberry Pi 4 and forward them via Telegram

HOWTO: Receive SMS via 4G/LTE Huawei stick on Raspberry Pi 4 and forward them via Telegram

I live abroad and have only 1 sim card slot in my phone. It holds the SIM card of the country that I am in right now. But I also have another SIM card from my home country which receives my banking SMS codes. I can't afford to lose the "home" SIM card, so I decided to keep it in my house and forward the SMS messages to my main phone and computer via Telegram (just like Whatsapp, but so much better).

I also made a choice to use a 4G/LTE stick instead of 3G, because the 3G signal in my area is getting worse in worse due to operators upgrading their equipment.

Prerequisites

  1. Raspberry Pi 4
  2. Huawei E8372 (but can be any similar)

Step 1 - Get the Huawei card to work properly with Raspberry

@bradtraversy
bradtraversy / django_deploy.md
Last active April 4, 2024 11:28
Django Deployment - Digital Ocean

Django Deployment to Ubuntu 18.04

In this guide I will go through all the steps to create a VPS, secure it and deploy a Django application. This is a summarized document from this digital ocean doc

Any commands with "$" at the beginning run on your local machine and any "#" run when logged into the server

Create A Digital Ocean Droplet

Use this link and get $10 free. Just select the $5 plan unless this a production app.

@joseluisq
joseluisq / terminal-git-branch-name.md
Last active April 20, 2024 02:26
Add Git Branch Name to Terminal Prompt (Linux/Mac)

Add Git Branch Name to Terminal Prompt (Linux/Mac)

image

Open ~/.bash_profile in your favorite editor and add the following content to the bottom.

# Git branch in prompt.

parse_git_branch() {
@sheikhwaqas
sheikhwaqas / setup-mysql.sh
Last active September 6, 2023 15:59
Install MySQL Server on Ubuntu (Non-Interactive Installation)
# Download and Install the Latest Updates for the OS
apt-get update && apt-get upgrade -y
# Set the Server Timezone to CST
echo "America/Chicago" > /etc/timezone
dpkg-reconfigure -f noninteractive tzdata
# Enable Ubuntu Firewall and allow SSH & MySQL Ports
ufw enable
ufw allow 22
@Mins
Mins / mysql_secure.sh
Last active February 16, 2024 00:03
Automating mysql_secure_installation
#!/bin/bash
aptitude -y install expect
// Not required in actual script
MYSQL_ROOT_PASSWORD=abcd1234
SECURE_MYSQL=$(expect -c "
set timeout 10