Skip to content

Instantly share code, notes, and snippets.

@mariozig
mariozig / migrate_repo.sh
Last active September 16, 2024 18:48
Migrate repo from GitLab to GitHub Full blog post @ http://ruby.zigzo.com/2015/03/23/moving-from-gitlab-to-github/
# Assume we are in your home directory
cd ~/
# Clone the repo from GitLab using the `--mirror` option
$ git clone --mirror [email protected]:mario/my-repo.git
# Change into newly created repo directory
$ cd ~/my-repo.git
# Push to GitHub using the `--mirror` option. The `--no-verify` option skips any hooks.
@goodjob1114
goodjob1114 / howToModifyOvaFile.md
Last active January 27, 2024 10:49
how to modify .ova file on linux/Mac using terminal....export vm (OVF 1.0) from virtualbox, then modify some tag and hash value for import vm to ESXi

extract ova files from an archive

$ tar -xvf vmName.ova

modify ovf for some invalid tag

$ vi vmName.ovf
@zpalexander
zpalexander / .bash_profile
Created April 15, 2017 18:50
Bash Profile
[[ -s "$HOME/.profile" ]] && source "$HOME/.profile" # Load the default .profile
[[ -s "$HOME/.rvm/scripts/rvm" ]] && source "$HOME/.rvm/scripts/rvm" # Load RVM into a shell session *as a function*
export NVM_DIR="$HOME/.nvm"
. "$(brew --prefix nvm)/nvm.sh"
# ---------------------------------------------------------------------------
#
# Description: This file holds all my BASH configurations and aliases
@fxkraus
fxkraus / debian-install-megacli.md
Last active October 31, 2024 19:43
Install LSI MegaCli .deb package on Debian/Ubuntu

download

wget https://docs.broadcom.com/docs-and-downloads/raid-controllers/raid-controllers-common-files/8-07-14_MegaCLI.zip

unzip

unzip 8-07-14_MegaCLI.zip
@andriy-rudyk
andriy-rudyk / graphiql-dark-mode.css
Last active February 28, 2021 14:16 — forked from bkeating/graphiql-dark-mode.css
GraphiQL One Dark Alt (Dark Mode) theme by Ben Keating
<style>
/* GraphiQL One Dark Alt (Dark Mode) theme by Ben Keating[1]
* Colors taken from Atom's One Dark theme[2]. Add this file to the end of
* your <head> block[3] to override built-in default styling.
*
* [1]. https://twitter.com/flowpoke
* [2]. https://github.com/atom/atom/tree/master/packages/one-dark-ui
* [3]. e.g. `.../site-packages/graphene_django/templates/graphene/graphiql.html`
*/
@rmcdongit
rmcdongit / macOS_SytemPrefs.md
Last active November 15, 2024 11:57
Apple System Preferences URL Schemes

macOS 10.15 System Preference Panes

Below are a list of System Preference pane URLs and paths that can be accessed with scripting to assist users with enabling macOS security settings without having to walk them through launching System Preferences, finding panes, and scrolling to settings. Not all panes have an accessible anchor and some are OS specific.

To find the Pane ID of a specific pane, open the System Preferences app and select the desired Preference Pane. With the pane selected, open the ScriptEditor.app and run the following script to copy the current Pane ID to your clipboard and display any available anchors:

tell application "System Preferences"
	set CurrentPane to the id of the current pane
	set the clipboard to CurrentPane
@jessangarcia
jessangarcia / Regex_Tutorial.md
Last active January 22, 2023 01:46
regular expressions? or cat walking on keyboard?

Regular Expressions

The purpose of this tutorial is to show you how to use regular expression. Learning this can help locate snipets of code with almost all programming languages. You can use these to find certain combinations within a string. I will be using this gist to identify some of these expressions.

Summary

/^#?([a-f0-9]{6}|[a-f0-9]{3})$/

This regular expression is used to match Hex Values. All of this will be broken down, and I will be explaining how these are used in this particular Regex. You can use this site to help further your understanding of Regex https://regexr.com/

@narze
narze / gh-add-repos-to-team.sh
Created July 22, 2022 08:33
Add repos to team with gh
#!/bin/bash
PERMISSION="push" # Can be one of: pull, push, admin, maintain, triage
ORG="orgname"
TEAM_SLUG="your-team-slug"
# Get names with `gh repo list orgname`
REPOS=(
"orgname/reponame"
)