Skip to content

Instantly share code, notes, and snippets.

ihrankouski / .bashrc
Last active June 24, 2021 20:43
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 /
Created May 8, 2020 19:08 — forked from myusuf3/
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 / 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 / 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
- 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 /
Created October 2, 2019 13:48 — forked from estebistec/
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
ihrankouski /
Created June 18, 2019 10:44 — forked from jaytaylor/
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.

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 /
Created August 16, 2016 21:37 — forked from Globegitter/
Install the latest nginx from source for Ubuntu 14.04
# Automatically instal the latest nginx
wget -O - | 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 trusty nginx" | sudo tee -a /etc/apt/sources.list
echo "deb-src trusty nginx" | sudo tee -a /etc/apt/sources.list