Skip to content

Instantly share code, notes, and snippets.

View lxtadhamnawito's full-sized avatar

Adham Nawito lxtadhamnawito

View GitHub Profile
@niksumeiko
niksumeiko / git.migrate
Last active July 19, 2024 21:32
Moving git repository and all its branches, tags to a new remote repository keeping commits history
#!/bin/bash
# Sometimes you need to move your existing git repository
# to a new remote repository (/new remote origin).
# Here are a simple and quick steps that does exactly this.
#
# Let's assume we call "old repo" the repository you wish
# to move, and "new repo" the one you wish to move to.
#
### Step 1. Make sure you have a local copy of all "old repo"
### branches and tags.
@wskidmore
wskidmore / getcolrange.js
Created October 12, 2012 22:09
Get Column Range by Start Row Index, google script for spreadsheets
// example usage
function testGetFullColumn()
{
Logger.log(getFullColumn('A', 1).getNumRows()); // number rows A1:A end
Logger.log(getFullColumn('B', 2).getNumRows()); // number rows B2:B end
Logger.log(getFullColumn('C', 5).getNumRows()); // number rows C5:C end
// also look into:
// https://developers.google.com/apps-script/storing_data_spreadsheets#reading-2
// for converting a range into js objects for easier calculations
}