Skip to content

Instantly share code, notes, and snippets.

travisjj

Block or report user

Report or block travisjj

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@travisjj
travisjj / topbarhover.js
Created Feb 9, 2017
Keeps the topbar open, also opens on hover
View topbarhover.js
$('.secondary-nav a.-link').each(function(){this.removeAttribute("title");});
var btns = [];
var achieve = { btn: 'a.-link.js-achievements-button', mod: '.topbar-dialog.achievements-dialog.dno' };
btns.push(achieve);
var inbox = { btn: 'a.-link.js-inbox-button', mod: '.topbar-dialog.inbox-dialog.dno' };
btns.push(inbox);
var se = { btn: 'a.-link.js-site-switcher-button.js-gps-track', mod: '.topbar-dialog.siteSwitcher-dialog.dno' };
btns.push(se);
for( var ind in btns ){
var tar = btns[ind].btn;
View internmock.cs
public class Db : IDisposable
{
private List<Intern> Interns { get; set; }
private List<Work> Works { get; set; }
private int internId = 0;
private int workId = 0;
public Db()
{
this.Interns = new List<Intern>();
this.Works = new List<Work>();
View annealingsimulation.cs
//dianthus simulation
class SimulatedAnnealingProgram
{
static Random random;
//static void Main(string[] args)
public SimulatedAnnealingProgram()
{
try
{
// Set up problem data.
View gist:5431228
HTMLImageElement.prototype.transitionTo = function(newSrc, duration, cb){
var original = this;
var clone = original.cloneNode(true, true);
var opacity = function (el, opacity) {
el.style.filter = 'alpha(opacity=' + Math.round(opacity * 100) + ')';
el.style.opacity = opacity;
};
clone.style.width = original.clientWidth+'px';
clone.style.position = 'absolute';
clone.src = original.src;
You can’t perform that action at this time.