Skip to content

Instantly share code, notes, and snippets.

View eulereadgbe's full-sized avatar

Elvi Nemiz eulereadgbe

  • Southeast Asian Fisheries Development Center, Aquaculture Department
View GitHub Profile
@eulereadgbe
eulereadgbe / how_to_keep_a_git_branch_up_to_date.txt
Created July 5, 2017 02:04 — forked from hardyoyo/how_to_keep_a_git_branch_up_to_date.txt
How to keep a git branch up to date with an upstream master branch.
git fetch --all
git checkout master #may have to git stash first, but, don't forget, you need to be ON THE MASTER BRANCH before you proceed
git pull upstream master
git push origin master
git pull origin master #not necessary but a nice sanity check
git checkout BRANCHNAME
git rebase -i master
@eulereadgbe
eulereadgbe / snippet-truncate-text.js
Last active August 12, 2016 08:41
Integration of jquery dotdotdot plugin to abstracts
$('.truncable-txt').append('<span class="read-more trigger-js">&#160;<a class="read-more__txt small">[+] Show more</a></span>' +
'<span class="read-less trigger-js">&#160;<a class="read-less__txt small">[-] Show less</a></span>');
var bindReadMore = function(){
$('.read-more').on('click', function(e) {
e.preventDefault();
var parent = $(this).parent();
parent.trigger("destroy");
parent.removeClass('truncable-txt--is-truncated');
parent.addClass('truncable-txt--is-not-truncated');
@eulereadgbe
eulereadgbe / scopus-citecounts.js
Last active July 27, 2016 07:16
Scopus citation counts in DSpace xmlui modified from https://gist.github.com/aschweer/6772579
/*
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
callbackCitedbycount = function(){
if (sciverse.areSearchResultsValid()) {
var resultObj = sciverse.getSearchResults();