Skip to content

Instantly share code, notes, and snippets.

@kkarimi
kkarimi / cloud-init.yaml
Created March 8, 2025 22:38 — forked from NatElkins/cloud-init.yaml
cloud-init script for VPS
#cloud-config
# Enable automatic package updates and upgrades during cloud-init execution
package_update: true
package_upgrade: true
packages:
# Security and Hardening
- ufw
- fail2ban
@kkarimi
kkarimi / create_pr.sh
Created September 14, 2024 07:42 — forked from slavingia/create_pr.sh
Create a (draft) pull request using GitHub CLI
#!/bin/bash
# Create a (draft) pull request using GitHub CLI.
# It assigns the PR to the current user, fills in the title from the first commit,
# and uses the PR template file for the description.
set -euo pipefail
# Colors for output
RED='\033[0;31m'
@kkarimi
kkarimi / README.md
Created August 4, 2024 21:22 — forked from adtac/README.md
Using your Kindle as an e-ink monitor

using your Kindle as an e-ink monitor

demo: https://x.com/adtac_/status/1820127470613622950 (3.5 fps, Paperwhite 3)

step 1: jailbreak your Kindle

mobileread.com is your best resource here, follow the instructions from the LanguageBreak thread

I didn't really follow the LanguageBreak instructions because I didn't care about most of the features + I was curious to do it myself, but the LanguageBreak github repo was invaluable for debugging

import * as cdk from '@aws-cdk/core';
import { Service, Source, GitHubConnection, ConfigurationSourceType, Runtime } from '../lib';
const app = new cdk.App();
const stack = new cdk.Stack(app, 'integ-apprunner');
// Scenario 4: Create the service from Github. Make sure you specify a valid connection ARN.
const connectionArn = process.env.CONNECTION_ARN || 'MOCK';
const service4 = new Service(stack, 'Service4', {
<!--
based on Neil Browns generator here: https://github.com/neilzone/ofcom_drama_range_phone_number_generator/blob/master/index.php
-->
<!DOCTYPE html>
<html>
<head>
<title>Ofcom number generator</title>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
const zeros = (i) => {
let result = '';
for (var x=0; x<i; x++) {
result = result+'0'
}
return result
}
const inner = (numZero) => (str) => {
if (str === undefined) {
@kkarimi
kkarimi / Recommendations.md
Created January 8, 2020 11:50 — forked from nimrodsun/Recommendations.md
Agile, Lean & DevOps - Recommendations

This is a reading list that I used to keep on my laptop, so I could recommend books I'd read to people who were interested. Putting it online makes it easier to share and harder to lose (hopefully!).

I have a healthy backlog of books to read, but I'm always interested in new recommendations. Let me know if you find any of this useful.

Topic Fundamentals Intermediate Advanced
Leadership [The Phoenix Project](https://www.amazon.co.uk/Phoenix-Project-DevOps-Helping-Business
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.35.2/install.sh | bash
nvm install 12
nvm use 12
nvm alias default 12
npm install -g npm
npm i -g yarn
yarn global add yarn
npm rm -g yarn
yarn global add npm
npm rm -g npm
Ctrl+Shift+X - Toggle between showing all terminals and only showing the current
one.
Ctrl+Shift+O - Split terminals Horizontally.
Ctrl+Shift+E - Split terminals Vertically.
Ctrl+Shift+Right - Move parent dragbar Right.
Ctrl+Shift+Left - Move parent dragbar Left.
## Useful Commands
Get kubectl version
kubectl version
Get cluster info: