Skip to content

Instantly share code, notes, and snippets.

View IanoNjuguna's full-sized avatar
:electron:

Iano Njuguna IanoNjuguna

:electron:
View GitHub Profile
@IanoNjuguna
IanoNjuguna / download-vs-code-server.sh
Created June 5, 2024 10:46 — forked from b01/download-vs-code-server.sh
Linux script to download latest VS Code Server, good for Docker (tested in Alpine).
#!/bin/sh
# Copyright 2023 Khalifah K. Shabazz
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the “Software”),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
@IanoNjuguna
IanoNjuguna / sms-script.py
Created April 14, 2024 13:40
This script sends an sms using the textbelt sms api.
#!/bin/python3
import requests
resp = requests.post('https://textbelt.com/text', {
'phone': '5555555555', # Customise the phone number for your personal use
'message': 'Hello world', # Customise the message for your personal use
'key': 'textbelt', # Use key=textbelt to send 1 free text per day
})
print(resp.json())
@IanoNjuguna
IanoNjuguna / mp4_to_mp3.bat
Last active April 10, 2024 19:03
When executed, this batch script converts all video files (mp4) in a folder to audio files (mp3) and stores them in the output\ folder (automatically created). NOTE: You should have ffmpeg installed before execution.
echo off
mkdir outputs
for %%a in ("*.mp4") do ffmpeg -i "%%a" -b:a 192K -vn "outputs\%%~na.mp3"
pause
@IanoNjuguna
IanoNjuguna / download website assets
Created September 22, 2023 21:15 — forked from christiangenco/download website assets
Use wget to download a website's assets, including images, css, javascript, and html. From http://www.linuxjournal.com/content/downloading-entire-web-site-wget
$ wget \
--recursive \
--no-clobber \
--page-requisites \
--html-extension \
--convert-links \
--domains website.org \
--no-parent \
www.website.org/tutorials/html/
@IanoNjuguna
IanoNjuguna / self-taught-beginner.md
Created September 18, 2023 19:51 — forked from gowizzard1/self-taught-beginner.md
Comprehensive Step-by-Step Guide & Resources for Aspiring Self-Taught Software Engineers

Here are numerous self-taught resources available online for beginners in software engineering. Here's a step-by-step guide for someone starting out, complete with resources:

1. Foundations

@IanoNjuguna
IanoNjuguna / youtube.md
Created June 22, 2023 12:22 — forked from bitsurgeon/youtube.md
Markdown cheatsheet for YouTube

Embed YouTube Video in Markdown File

  1. Markdown style
[![Watch the video](https://img.youtube.com/vi/nTQUwghvy5Q/default.jpg)](https://youtu.be/nTQUwghvy5Q)
  1. HTML style
<a href="http://www.youtube.com/watch?feature=player_embedded&v=nTQUwghvy5Q" target="_blank">
@IanoNjuguna
IanoNjuguna / .bashrc
Last active August 27, 2023 19:50
Additional Commands For My BashRC Config File
# sign commits alias
alias commit='commit -S'
# gnupg - verifies signed commits in GitHub
export GPG_TTY=$(tty)
[ -f ~/.fzf.bash ] && source ~/.fzf.bash
# compile C programs (Aggresive compiler)
alias gcc='gcc -Wall -Werror -pedantic -Wextra -std=gnu89'
@IanoNjuguna
IanoNjuguna / init.vim
Last active June 26, 2023 13:53
Configuration For My NVIM INIT File
" Mouse settings
:set mouse=a
" Customise tabs length
:set tabstop=4 shiftwidth=4 smarttab softtabstop=4
" Indent automatically
:set autoindent
" Intelligent indentation for C code
@IanoNjuguna
IanoNjuguna / .vimrc
Last active June 13, 2023 19:05
Additional Configurations For My Dot Vimrc File
" Customise tabs length
set tabstop=4 shiftwidth=4
" Indent automatically
set autoindent
" Intelligent indentation for C code
set smartindent
set cindent
@IanoNjuguna
IanoNjuguna / venv.md
Created January 10, 2023 19:51
Create a Virtual Environment

Create a Virtual Environment

It is suggested to have a dedicated virtual environment for each Django project, and one way to manage a virtual environment is pipenv or venv, which is included in Python.

With venv, you can create a virtual environment by typing this in the command prompt, remember to navigate to where you want to create your project.

Windows:

py -m venv myproject

Unix/MacOS: