Skip to content

Instantly share code, notes, and snippets.

View ameeno's full-sized avatar
Coding

Ameeno ameeno

Coding
View GitHub Profile
@ameeno
ameeno / index.php
Created September 6, 2018 22:15 — forked from amfeng/index.php
Stripe OAuth Example -- PHP
<?php
define('CLIENT_ID', 'YOUR_CLIENT_ID');
define('API_KEY', 'YOUR_API_KEY');
define('TOKEN_URI', 'https://connect.stripe.com/oauth/token');
define('AUTHORIZE_URI', 'https://connect.stripe.com/oauth/authorize');
if (isset($_GET['code'])) { // Redirect w/ code
$code = $_GET['code'];
@ameeno
ameeno / mount_qcow2.md
Created May 22, 2021 00:10 — forked from shamil/mount_qcow2.md
How to mount a qcow2 disk image

How to mount a qcow2 disk image

This is a quick guide to mounting a qcow2 disk images on your host server. This is useful to reset passwords, edit files, or recover something without the virtual machine running.

Step 1 - Enable NBD on the Host

modprobe nbd max_part=8
@ameeno
ameeno / 📊 Weekly development breakdown
Last active October 1, 2024 01:16
Wakatime Box to use in profiles
Python 1 hr 24 mins ████████▍░░░░░░░░░░░░ 40.0%
YAML 52 mins █████▏░░░░░░░░░░░░░░░ 24.8%
Docker 39 mins ███▉░░░░░░░░░░░░░░░░░ 18.5%
Other 12 mins █▎░░░░░░░░░░░░░░░░░░░ 6.2%
CSV 10 mins █░░░░░░░░░░░░░░░░░░░░ 5.1%
@ameeno
ameeno / dotfiles-install.sh
Last active September 18, 2022 21:43
Dotfiles Install Script
#!/usr/bin/env bash
set -o errexit -o pipefail -o noclobber -o nounset
function config {
git --git-dir="$HOME"/.dotfiles.git/ --work-tree="$HOME" "$@"
}
export -f config
@ameeno
ameeno / dotfiles-gitconfig
Last active August 11, 2022 22:11
gitconfig for my bare dotfiles
[core]
repositoryformatversion = 0
filemode = true
bare = true
ignorecase = true
sshCommand = ssh -i ~/.ssh/personal_key -F /dev/null
hooksPath = ~/.dotfiles.hooks
[status]
showUntrackedFiles = no
[remote "origin"]
@ameeno
ameeno / rclone-mount.service
Last active February 17, 2022 15:24
rclone systemd service
# /etc/systemd/system/rclone.service
[Unit]
Description=Google Drive (rclone)
AssertPathIsDirectory=/home/arun/google_drive/
After=k3s-node.service
[Service]
Type=simple
User=arun
Group=arun
@ameeno
ameeno / open-ports.sh
Last active March 19, 2022 08:40
check open ports linux
How to check if port is in use in
To check the listening ports and applications on Linux:
Open a terminal application i.e. shell prompt.
Run any one of the following command on Linux to see open ports:
sudo lsof -i -P -n | grep LISTEN
sudo netstat -tulpn | grep LISTEN
sudo ss -tulpn | grep LISTEN
sudo lsof -i:22 ## see a specific port such as 22 ##
@ameeno
ameeno / osx_setup.md
Created April 23, 2022 07:36 — forked from millermedeiros/osx_setup.md
Mac OS X setup

Setup Mac OS X

I've done the same process every couple years since 2013 (Mountain Lion, Mavericks, High Sierra, Catalina) and I updated the Gist each time I've done it.

I kinda regret for not using something like Boxen (or anything similar) to automate the process, but TBH I only actually needed to these steps once every couple years...

@ameeno
ameeno / private_fork.md
Created February 10, 2023 13:54 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@ameeno
ameeno / Royal-London-Funds.md
Created March 2, 2024 10:09
Royal London Funds List
Fund name/Dynamic factsheet SEDOL Bid price Offer price Daily movement Price date
RLP Absolute Return Government Bond BYY0KS1 103.30p 108.80p 0.10p 01/03/2024
RLP Adventurous Managed B02LCD7 351.20p 369.70p 0.50p 01/03/2024
RLP American Tilt 783237 2749.70p 2894.50p 4.70p 01/03/2024
RLP Annuity BYYJBQ3 101.60p 106.90p -0.10p 01/03/2024
RLP Asia Pacific Core Plus (Invesco Asian) B0ZPKB0 416.10p 438.00p 1.00p 01/03/2024
RLP Asia Pacific Core Plus (Stewart Investors Asia Pacific Leaders Sustainability) B560XN2 293.20p 308.60p 2.40p 01/03/2024
RLP Commodity BYT3SR0 117.50p 123.70p 0.40p 01/03/2024
RLP Corporate Bond 3169276 263.50p 277.40p -0.70p 01/03/2024