Skip to content

Instantly share code, notes, and snippets.

@velyo
velyo / GitDeleteLastCommit
Created August 3, 2018 08:36
How to delete last commit on remote as well
git reset HEAD^ --hard
git push mathnet -f
@velyo
velyo / MercurialCloneChunks.md
Created December 20, 2016 21:24
Mercurial clone big repos in chunks

Clone big repository in small chunks using -r like this:

hg init montao
cd montao
hg pull -r 50 https://niklasr@bitbucket.org/niklasr/montao  # get the first 50 changesets
hg pull -r 100 https://niklasr@bitbucket.org/niklasr/montao  # get the next 50 changesets
...
@velyo
velyo / GitAliases.md
Last active August 4, 2023 03:28
Git Aliases collection

Git Aliases

This is a collection of some usefule git aliases.

git status shortcut [usage: git st]

git config --global alias.st status

checkout shortcut [usage: git co dev]

git push origin +7f6d03:master
@velyo
velyo / gist:db1518e2c425baabd9e5
Created December 9, 2014 10:23
jQuery DataTable sample
function DataGrid() {
this.sDom = 'CT<"clear">Rlfrtip';
// TableTool options
this.oLanguage = {
// Remove the word entries
"sLengthMenu" : "Show _MENU_",
};
// Disable sorting on columns with class="sort-no"
this.aoColumnDefs = [
function ShopAsyncQueue() {
this.push = function () {
for (var i = 0; i < arguments.length; i++) {
try {
if (typeof arguments[i] === "function") arguments[i]();
else {
// TODO
}
}
catch (e) {