Skip to content

Instantly share code, notes, and snippets.

View daduam's full-sized avatar

Joseph Ampadu daduam

View GitHub Profile
@sandikodev
sandikodev / gsm-setup.md
Created February 23, 2021 10:07 — forked from heyalexej/gsm-setup.md
SIM Card Management Through GSM Modem On Linux

SIM Card Management Over GSM Modem

A small guide on how to send and receive USSD codes on Linux

I am using the built in GSM (UMTS) modem of my Thinkpad X1 extensively because I am often in places with flaky internet connections. I connect through the standard Network Manager on Ubuntu and everything works fine. There was one major annoyance though. Every time I wanted to top up the SIM balance or book a new package, I needed a phone to send and receive USSD codes. So I took some time to figure out how to do it from the shell. I wrote this down as a help for others and a reminder for myself. Without further ado...

First intsall gammu and picocom.

~  sudo apt-get install -y gammu picocom
@eldadfux
eldadfux / .env
Last active June 29, 2022 05:24
Appwrite 0.14 - Stack
_APP_ENV=production
_APP_LOCALE=en
_APP_OPTIONS_ABUSE=enabled
_APP_OPTIONS_FORCE_HTTPS=disabled
_APP_OPENSSL_KEY_V1=your-secret-key
_APP_DOMAIN=localhost
_APP_DOMAIN_TARGET=localhost
_APP_CONSOLE_WHITELIST_ROOT=enabled
_APP_CONSOLE_WHITELIST_EMAILS=
_APP_CONSOLE_WHITELIST_IPS=
@jesster2k10
jesster2k10 / README.md
Last active July 24, 2024 19:10
JWT Auth + Refresh Tokens in Rails

JWT Auth + Refresh Tokens in Rails

This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.

I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)

Before trying it out DIY, I considered using:

@yizeng
yizeng / .dockerignore
Last active February 29, 2024 14:36
An example .dockerignore file for Rails
.git
.gitignore
# Created by https://www.gitignore.io/api/git,ruby,rails,jetbrains+all
# Edit at https://www.gitignore.io/?templates=git,ruby,rails,jetbrains+all
### Git ###
# Created by git for backups. To disable backups in Git:
# $ git config --global mergetool.keepBackup false
*.orig
@rao123dk
rao123dk / node_modules.txt
Created August 14, 2019 07:14
delete all node_modules in your system
(A) This command will print out each folder, and even show us how much space the folder is occupying
// Mac / Linux:
find . -name "node_modules" -type d -prune -print | xargs du -chs
//Windows:
FOR /d /r . %d in (node_modules) DO @IF EXIST "%d" echo %d"
@ivankahl
ivankahl / jacobi.m
Last active April 3, 2024 20:55
The Jacobi method implemented in Octave.
function xnew = jacobi(A, b, xold)
% This is a sample implementation of the Jacobi method in
% Octave.
% We first need to determine how many equations there are
% that we need to solve
n = size(A, 1);
% We create a blank xnew vector to store the final results
xnew = zeros(n, 1);
@happygrizzly
happygrizzly / vuejs-php.md
Created October 19, 2017 14:52
VueJs and PHP

VueJs and PHP

Setup

First test

Name: Flash
Serial: eNrzzU/OLi0odswsqnHLSSzOqDGoca7JKCkpsNLXLy8v1ytJTczVLUotKNFLzs8FAJHYETc=
if anyone wants to thank ETH: 0x527c2aB55b744D6167dc981576318af96ed26676
Thank you!
@joshbuchea
joshbuchea / semantic-commit-messages.md
Last active July 24, 2024 08:58
Semantic Commit Messages

Semantic Commit Messages

See how a minor change to your commit message style can make you a better programmer.

Format: <type>(<scope>): <subject>

<scope> is optional

Example

@edesdan
edesdan / .gitignore
Last active June 1, 2024 21:13
A .gitignore file suitable for development with Java, Maven, Gradle, IntelliJ, Android Studio on a MacOS
# Reference: https://github.com/github/gitignore
# From: https://gist.github.com/edesdan/6bb43343740bcd54ef0f56a384a2f66f
######################
###### Mac OS X ######
######################
# Folder view configuration files
.DS_Store
Desktop.ini