Skip to content

Instantly share code, notes, and snippets.

View DrJohan's full-sized avatar
🏠
Working from home

Johan Ibrahim DrJohan

🏠
Working from home
  • Royal College Of Surgeons Ireland
  • Kuala Lumpur,MYS
  • 01:40 (UTC +08:00)
View GitHub Profile
@DrJohan
DrJohan / Microsoft.PowerShell_profile.ps1
Created July 10, 2022 09:12
PowerShell profile based on Scott Hanselmann gist
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost') {
Import-Module PSReadLine
}
#Import-Module PSColors
#Import-Module posh-git
Import-Module -Name Terminal-Icons
#Import-Module oh-my-posh
using namespace System.Management.Automation
using namespace System.Management.Automation.Language
if ($host.Name -eq 'ConsoleHost')
{
Import-Module PSReadLine
}
Import-Module -Name Terminal-Icons
@DrJohan
DrJohan / JohanOhMyposh.omp.json
Created July 10, 2022 04:57
Johan OhMyPosh Theme
{
"$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json",
"blocks": [
{
"alignment": "left",
"segments": [
{
"background": "#c386f1",
"foreground": "#ffffff",
"leading_diamond": "\ue0b6",
@DrJohan
DrJohan / ohmyposhv3-v2.json
Created December 27, 2021 14:27 — forked from shanselman/ohmyposhv3-v2.json
ohmyposhv3-v2
{
"final_space": true,
"console_title": true,
"console_title_style": "folder",
"blocks": [
{
"type": "prompt",
"alignment": "left",
"horizontal_offset": 0,
"vertical_offset": 0,
@DrJohan
DrJohan / copyInstalledPackages.r
Created April 25, 2018 05:46 — forked from florianhartig/copyInstalledPackages.r
Script to copy the packages installed on one computer or R version to another. Originally from http://stackoverflow.com/questions/1401904/painless-way-to-install-a-new-version-of-r-on-windows
# run on old computer / r version
setwd("C:/Temp/") # or any other existing temp directory
setwd("/Users/Florian/Dropbox/temp")
packages <- installed.packages()[,"Package"]
save(packages, file="Rpackages")
# run on new computer / r version
setwd("C:/Temp/") # or any other existing temp directory
load("Rpackages")