Skip to content

Instantly share code, notes, and snippets.

View CodeIter's full-sized avatar
🍊
Welcome

Muhammad Amin Boubaker CodeIter

🍊
Welcome
View GitHub Profile
@CodeIter
CodeIter / custom-tinycore.sh
Created April 13, 2024 10:50 — forked from dankrause/custom-tinycore.sh
Create a custom tinycore linux iso. Adjust the config at the beginning of the script, or supply a conf as the first arg. Requires xorriso.
#!/bin/bash
set -e
function cleanup() {
# clean up our temp folder
rm -rf "${TMPDIR}"
}
trap cleanup EXIT
@CodeIter
CodeIter / LICENSE
Last active February 12, 2024 09:55
Tmux Launcher - Session & Window Management. Effortlessly manage tmux sessions and open new windows with flexibility. This script checks for existing sessions, allows opening new ones in named groups, or attaches to the last session if preferred. Customize behavior with commented-out options.
MIT License
Copyright (c) 2024 Muhammad Amin Boubaker
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:
@CodeIter
CodeIter / load_ssh_keys_from_pass.md
Last active February 24, 2024 08:18
Automatically load ssh keys in bash

Automatically load ssh keys : Add to .bashrc and configure environment variable.

export SSH_DIR="${HOME}/.ssh"
command mkdir -p "${SSH_DIR}"
if [[ -z "${SSH_AUTH_SOCK:-}" ]] ; then
  eval "$(ssh-agent -s)" >/dev/null 2>&1
  export SSH_AUTH_SOCK="${SSH_AUTH_SOCK}"
fi
export SSH_AGENT_LIFE=14400 # 4 hours
@CodeIter
CodeIter / get_github_repo_size.bash
Last active December 27, 2023 15:31
bash function to retrieve and display the sizes of GitHub repositories.
#!/usr/bin/env -S bash -euo pipefail
get_github_repo_size() {
if [[ "$1" == "--help" || "$1" == "-h" ]]; then
echo "Usage: get_github_repo_size [OPTIONS] {GITHUB_REPO_URLS...}"
echo
echo "Retrieve and display the sizes of GitHub repositories."
echo "The function will automatically use the GITHUB_TOKEN if it's set as an environment variable."
echo
@CodeIter
CodeIter / README.md
Created April 9, 2022 17:53
get git remote url as `https`. Whatever your remote Git repository settings are.

git-remote-http

get git remote url as https. Whatever your remote Git repository settings are.

use it :

  • for github.com repo :
    • git-remote-http.sh get first repo https url as ordered by git.
    • git-remote-http-all.sh get all repo https url as ordered by git.
/* https://stackoverflow.com/a/49434126 */
.CodeMirror {
resize : vertical !important;
overflow : auto !important;
}
REGEDIT4
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FirefoxPortable.exe]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FirefoxPortable.exe\shell]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FirefoxPortable.exe\shell\open]
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\FirefoxPortable.exe\shell\open\command]
@CodeIter
CodeIter / yarn_add_shrink-ray.log
Created September 26, 2019 16:16
log of `yarn add shrink-ray@* ` command
yarn add shrink-ray@*
yarn add v1.17.3
[1/6] Validating package.json...
[2/6] Resolving packages...
warning shrink-ray > node-zopfli > node-pre-gyp > hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning shrink-ray > node-zopfli > node-pre-gyp > request > hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning shrink-ray > node-zopfli > node-pre-gyp > hawk > boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning shrink-ray > node-zopfli > node-pre-gyp > hawk > cryptiles@2.0.5: This version has been dep
@CodeIter
CodeIter / yarn_add_shrink-ray.log
Created September 26, 2019 16:16
log of `yarn add shrink-ray@* ` command
yarn add shrink-ray@*
yarn add v1.17.3
[1/6] Validating package.json...
[2/6] Resolving packages...
warning shrink-ray > node-zopfli > node-pre-gyp > hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning shrink-ray > node-zopfli > node-pre-gyp > request > hawk@3.1.3: This module moved to @hapi/hawk. Please make sure to switch over as this distribution is no longer supported and may contain bugs and critical security issues.
warning shrink-ray > node-zopfli > node-pre-gyp > hawk > boom@2.10.1: This version has been deprecated in accordance with the hapi support policy (hapi.im/support). Please upgrade to the latest version to get the best features, bug fixes, and security patches. If you are unable to upgrade at this time, paid support is available for older versions (hapi.im/commercial).
warning shrink-ray > node-zopfli > node-pre-gyp > hawk > cryptiles@2.0.5: This version has been dep
@CodeIter
CodeIter / phantomjs-full-example.js
Created July 22, 2016 15:31
phantomjs-full-example.js
//phantomjs-full-example.js
var system = require('system');
var fs = require('fs');
var process = require("child_process");
var spawn = process.spawn;
var execFile = process.execFile;
var webPage = require('webpage');
var page = webPage.create();