Skip to content

Instantly share code, notes, and snippets.

@ihrankouski
ihrankouski / .bashrc
Last active June 24, 2021 20:43
.bashrc
PS1='\[\e[1;32m\]\u\[\e[1;32m\]@\[\e[1;32m\]\h \[\e[1;34m\]\w\[\e[1;37m\]\[\e[1;35m\]$(__git_ps1)\n \[\e[1;30m\]└─ \[\e[1;37m\]\$\[\033[0m\] '
PS1="\[\033[38;1;33m\]\t\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;1;32m\]\u\[$(tput sgr0)\] \[$(tput sgr0)\]\[\033[38;1;34m\]\w\[$(tput sgr0)\]\[\e[1;35m\]$(__git_ps1) \[$(tput sgr0)\]\[\033[38;1;2m\]$(echo $STY | cut -d '.' -f 1 | xargs -I '{}' echo '<{}>')\n \[$(tput sgr0)\]\[\033[38;5;8m\]└─\[$(tput sgr0)\] \[$(tput bold)\]\\$\[$(tput sgr0)\] "
@ihrankouski
ihrankouski / delete_git_submodule.md
Created May 8, 2020 19:08 — forked from myusuf3/delete_git_submodule.md
How effectively delete a git submodule.

To remove a submodule you need to:

  • Delete the relevant section from the .gitmodules file.
  • Stage the .gitmodules changes git add .gitmodules
  • Delete the relevant section from .git/config.
  • Run git rm --cached path_to_submodule (no trailing slash).
  • Run rm -rf .git/modules/path_to_submodule (no trailing slash).
  • Commit git commit -m "Removed submodule "
  • Delete the now untracked submodule files rm -rf path_to_submodule
@ihrankouski
ihrankouski / example.dart
Created April 21, 2020 21:52
Chewie: "autoFullScreenOnLandscape" + "autoLandscapeOnFullScreen"
import 'dart:async';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:video_player/video_player.dart';
import 'package:orientation/orientation.dart';
import 'package:chewie/chewie.dart';
@ihrankouski
ihrankouski / notes.txt
Created March 17, 2020 09:32 — forked from miguelmota/notes.txt
runc vs gvisor (runsc) vs rkt vs KataContainers vs NablaContainers
knowledge dump on container runtimes
KataContainers
- image coupled with kernel
- light vm layer
- can run in nested virturalization environments if hardware supports and you can enable it in bios (ex. only bare metal EC2 instances, limits many cloud providers)
- slower startup time
- OCI compliant
- previously known as ClearContainers by Intel
@ihrankouski
ihrankouski / README.md
Created October 2, 2019 13:48 — forked from estebistec/README.md
This minimal setup allows you to run nginx using the current folder as the doc-root. NOTE: python's simplehttpserver may be good enough for you. This is just a nice simple nginx setup.
  1. Get all of these files into the target folder
  2. Run the following commands:
chmod +x *.sh
./nginx-start.sh
@ihrankouski
ihrankouski / delete-from-v2-docker-registry.md
Created June 18, 2019 10:44 — forked from jaytaylor/delete-from-v2-docker-registry.md
One liner for deleting images from a v2 docker registry

One liner for deleting images from a v2 docker registry

Just plug in your own values for registry and repo/image name.

registry='localhost:5000'
name='my-image'
curl -v -sSL -X DELETE "http://${registry}/v2/${name}/manifests/$(
    curl -sSL -I \
        -H "Accept: application/vnd.docker.distribution.manifest.v2+json" \
/* --- Autohide scrollbar --- */
.tab {
max-width: 100vw;
}
#tablist {
margin-right: -15px; /* Value from KDE's Breeze theme; adjust as needed */
transition: margin-right 0s 0.5s;
}
#tablist:hover {
margin-right: 0px;
@ihrankouski
ihrankouski / nginx-latest.sh
Created August 16, 2016 21:37 — forked from Globegitter/nginx-latest.sh
Install the latest nginx from source for Ubuntu 14.04
# Automatically instal the latest nginx
wget -O - http://nginx.org/keys/nginx_signing.key | sudo apt-key add -
#Make a backup copy of your current sources.list file
sudo cp /etc/apt/sources.list /etc/apt/sources.list.bak
#Now copy the following repositories to the end of ` /etc/apt/sources.list`
echo "deb http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src http://nginx.org/packages/mainline/ubuntu/ trusty nginx" | sudo tee -a /etc/apt/sources.list