Skip to content

Instantly share code, notes, and snippets.

@ahszn
ahszn / duplicate_mirror_git_repo.md
Last active September 6, 2022 04:08
Mirror and sync one git repo from another git repo (*conditions apply)
  1. Mirror a repo (one time):
$ git clone --bare https://github.com/exampleuser/old-repository.git
$ cd old-repository.git
$ git push --mirror https://github.com/exampleuser/new-repository.git

... now delete the temporary local repo directory

  1. Mirror a repo (and regularly sync/push):
@ahszn
ahszn / gist-reveal.it-slides.html
Created August 16, 2020 06:20 — forked from ryanj/gist-reveal.it-slides.html
Gist-powered Revealjs slideshow presentations http://gist-reveal.it
<section data-background-transition='zoom' data-transition='concave' data-background='http://ryanjarvinen.com/presentations/shared/img/broadcast_reveal_dark.png' data-state='blackout'>
<h2>Gist-Powered</h2>
<h1>Reveal.js</h1>
<h2>Slideshow Presentations</h2>
<br/>
<h1 class='fragment grow'><a style='color:deepskyblue;' href='http://gist-reveal.it'>gist-reveal.it</a></h1>
</section>
<section data-background-transition='zoom' data-transition='linear' id='try-it'>
<h2>Try it out!</h2>
<p>Create your own deck by forking a copy of <a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>this github gist</a>: <br /><a href='https://gist.github.com/ryanj/af84d40e58c5c2a908dd'>https://gist.github.com/ryanj/af84d40e58c5c2a908dd</a></p>
@ahszn
ahszn / git_multi_account_1.txt
Created August 15, 2020 11:29
Git - adding a repo using a different github account
::Usecases::
* Adding a private repo
OR
* Adding a repo using a different account (than your global git settings)
:FLow of commands:
$ git init
$ git user.name <USERNAME>
@ahszn
ahszn / True Trello Printer
Created March 24, 2020 10:42 — forked from mathiasrw/True Trello Printer
Ever wanted to print your Trello board? Export as JSON and paste it into the code.
<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>True Trello Printer</title>
<link href="http://netdna.bootstrapcdn.com/bootstrap/3.0.3/css/bootstrap.min.css" rel="stylesheet">
<style>
body{margin:15%;}
.panel-body{
@ahszn
ahszn / tf command - delete workspace
Created March 3, 2020 00:05
tf command to delete workspace
tf command to delete workspace
------------------------------
Use case/Scenario:
-----------------
Sometimes files in TFS cannot be deleted because those files are locked in another workspace (server workspace) becasue those files are being checked out in that workspace.
To make things worse, the person who created the workspace had left the organisation. One way to solve the problem is to get rid of the workspace from TFS/VSTS/AzureDevOps server.
Step 1: Identify the workspaces to be addressed
------------------------------------------------
@ahszn
ahszn / tf_workspace_command_help.txt
Created March 2, 2020 23:50
tf workspace commands
tf vc workspaces
----------------
Displays information about workspaces in the system and updates cached
information about a user name or computer name change on the Azure DevOps
Server.
tf vc workspaces [/owner:ownername] [/computer:computername]
[/collection:TeamProjectCollectionUrl]
[/format:(brief|detailed|xml)] [/updateUserName:oldUserName]
[/updateComputerName:oldComputerName] [workspacename]
@ahszn
ahszn / gist:6b270beeba1c1af735ee551a60218cbd
Created November 29, 2018 05:50
solution: postman for windows not bypassing proxy for localhost
Set environment variable:
SET NO_PROXY=localhost,127.0.0.1
Source: https://github.com/postmanlabs/postman-app-support/issues/3942