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

@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
## Useful Commands
Get kubectl version
kubectl version
Get cluster info:
@kkarimi
kkarimi / gist:2d2ef7c7d5a4f502bfd39fd3bf385155
Created August 3, 2016 10:14 — forked from stuart11n/gist:9628955
rename git branch locally and remotely
git branch -m old_branch new_branch # Rename branch locally
git push origin :old_branch # Delete the old branch
git push --set-upstream origin new_branch # Push the new branch, set local branch to track the new remote
@kkarimi
kkarimi / 0_reuse_code.js
Last active August 29, 2015 14:10
Here are some things you can do with Gists in GistBox.
// Use Gists to store code you would like to remember later on
console.log(window); // log the "window" object to the console
@kkarimi
kkarimi / fabfile.py
Created August 8, 2012 16:01 — forked from IlianIliev/fabfile.py
Fabric script that eases the creation of new Django Project
"""
This fabric script automates the creation of a virtual environment and a Django
project. The result will be virtual environtment with the name of the project.
The folder namer where the project code will be placed is specified in
SOURCE_DIRECTORY_NAME, a static root folder will be created and settings.py
will be updated.
"""
try:
from fabric.api import env, run, local
from fabric.context_managers import lcd, prefix

Breaking into Web Development

I work as an analyst contractor, these days my roles are often a mixture of development and management. I have been asked by a countless number of people what they need to do to get the jobs I’m offered – and it’s simpler than most expect. The market for talented developers in the United Kingdom (and in many talent-lite communities around the world) is such that anyone who merely knows what they are doing has a very good chance of getting a job. Even a job contracting (which ordinarily has senior-level requirements).

To become a web developer with a good salary and employment expectations you need skills. Below I’ll provide a plan to get you towards the top of the largest market: PHP Web Development. Advanced knowledge of everything on this list would immediately make you one of the best, so just strive to have an exposure if not a comprehensive understanding (though the *starred points are essential). To learn these technologies you should use several in combination on on

@kkarimi
kkarimi / 2012_01_20-backups.md
Created June 16, 2012 22:56 — forked from fuzzmz/2012_01_20-backups.md
Backups blog post markdown syntax

Date: 2012-01-20 03:38 Title: Up, up, backup! Tags: backup, ftp, archive Category: linux Slug: backups

As I was saying at the end of the last post, locking myself out of the server really made me want to have implemented my backup mechanism sooner, especially considering that at this point in the life of QWERTY (my VPS) there isn't that much to back up.

In short, my backup needs are simple: