Skip to content

Instantly share code, notes, and snippets.

@siewho
siewho / private_fork.md
Created April 9, 2025 06:08 — forked from 0xjac/private_fork.md
Create a private fork of a public repository

The repository for the assignment is public and Github does not allow the creation of private forks for public repositories.

The correct way of creating a private frok by duplicating the repo is documented here.

For this assignment the commands are:

  1. Create a bare clone of the repository. (This is temporary and will be removed so just do it wherever.)

git clone --bare [email protected]:usi-systems/easytrace.git

@siewho
siewho / SSH-configuration-github-gitlab.md
Created April 7, 2025 12:50 — forked from marcoandre1/SSH-configuration-github-gitlab.md
Managing SSH keys for Github and Gitlab

Managing SSH keys for Github and Gitlab

NOTICE: This guide will help you set ssh keys for GitHub and GitLab. However, this is not going to change your commit user.name or user.email. If you need to change those for specific repositories, just run the following commands while in your repository:

git config user.name "Your Name Here"
git config user.email [email protected]

For more info, see this answer. Also, keep in mind this only changes the .git folder inside your repository which never gets added/committed/pushed/uploaded.

I recently had to manage two ssh keys (one for Github and one for Gitlab). I did some research to find the best solution. I am justing putting the pieces together here.

@siewho
siewho / wp-install.sh
Last active November 7, 2022 05:21
wp-install.sh
#!/bin/bash
# Default options
LOCALE="en_US"
DB_HOST="localhost"
echo "Name of the project? e.g.: My Project: "
read PROJECT_NAME
@siewho
siewho / .zshrc
Created November 4, 2022 01:03 — forked from callumlocke/.zshrc
ZSH function to auto-switch to correct Node version
####
# ZSH function to auto-switch to correct Node version
# https://gist.github.com/callumlocke/30990e247e52ab6ac1aa98e5f0e5bbf5
#
# - Searches up your directory tree for the closest .nvmrc, just like `nvm use` does.
#
# - If you are already on the right Node version, IT DOES NOTHING, AND PRINTS NOTHING.
#
# - Works correctly if your .nvmrc file contains something relaxed/generic,
# like "4" or "v12.0" or "stable".
@siewho
siewho / promises_reduce.js
Created October 30, 2021 02:31 — forked from anvk/promises_reduce.js
Sequential execution of Promises using reduce()
function asyncFunc(e) {
return new Promise((resolve, reject) => {
setTimeout(() => resolve(e), e * 1000);
});
}
const arr = [1, 2, 3];
let final = [];
function workMyCollection(arr) {
@siewho
siewho / macos_high_sierra_apache_php_brew_2018.md
Created July 6, 2019 03:25 — forked from karlhillx/macos_high_sierra_apache_php_brew_2018.md
macOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL

macOS High Sierra Setup: Homebrew + Apache + PHP + MariaDB + SSL

Homebrew Installation

First let's install Homebrew.

$ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

@siewho
siewho / rm_mysql.md
Created July 6, 2019 01:08 — forked from vitorbritto/rm_mysql.md
Remove MySQL completely from Mac OSX

Remove MySQL completely

  1. Open the Terminal

  2. Use mysqldump to backup your databases

  3. Check for MySQL processes with: ps -ax | grep mysql

  4. Stop and kill any MySQL processes

  5. Analyze MySQL on HomeBrew:

brew remove mysql

@siewho
siewho / snippet.php
Created June 27, 2019 02:15
This is a snippet shared on http://ed41.j38/
<?php echo $jsToolbar; ?>
<div id="ed" class="type-component
ed-responsive
<?php echo $categoryClass;?>
<?php echo $suffix; ?>
<?php echo 'view-' . $view; ?>
<?php echo 'layout-' . $layout; ?>
<?php echo $rtl ? ' is-rtl' : '';?>
@siewho
siewho / snippet.php
Created June 27, 2019 02:15
This is a snippet shared on http://ed41.j38/
<?php echo $jsToolbar; ?>
<div id="ed" class="type-component
ed-responsive
<?php echo $categoryClass;?>
<?php echo $suffix; ?>
<?php echo 'view-' . $view; ?>
<?php echo 'layout-' . $layout; ?>
<?php echo $rtl ? ' is-rtl' : '';?>
@siewho
siewho / base value
Last active December 16, 2015 08:20
base value
// Base
@fd-base-font-size: 12px;
@fd-base-font-size--xs: 11px;
@fd-base-font-size--lg: 14px;
@fd-base-line-height: 20px;
@fd-base-text-color: #333;
@fd-base-bg-color: #fff;
// Spacing