Skip to content

Instantly share code, notes, and snippets.

View robsonrosa's full-sized avatar

Róbson Machado Rosa robsonrosa

View GitHub Profile
@fbn4sc
fbn4sc / command.txt
Created January 29, 2018 01:35
Delete all branches except master and develop.
git branch | grep -v "master\|develop" | xargs git branch -D
@jeremyzilar
jeremyzilar / trello.md
Last active June 22, 2024 13:14
Copy Trello Board as text or markdown

Copy Trello Board as text or markdown

Wouldn't it be nice to copy out your Trello board as plain text or markdown to be able to put it in a weekly memo, shipping notice or release notes? Now you can!

How to use this

Copy this line of JS and paste it into the CONSOLE in your browser. The results will be saved to your clipboard.

Option 1: Copy your Trello Board as Markdown

This will copy your columns + cards as markdown right to left

var s = []; s.push("# " + jQuery(".board-header").children()[0].innerText); jQuery.fn.reverse = [].reverse; jQuery(".list:has(.list-header-name)").reverse().each(function() {s.push("\n## " + jQuery(this).find(".list-header-name-assist")[0].innerText + "\n"); jQuery(this).find(".list-card-title").each(function() {s.push("* " + this.innerText); }); }); copy(s.join("\n"));
@wgrrrr
wgrrrr / DbRepository.cs
Created April 2, 2014 01:16
A "query by example" implementation for Entity Framework 5 and C# 5 using a generic repository pattern.
/// <summary>
/// Uses the supplied entity as search criteria and returns matching records. When more than one entity properties
/// are populated it will use an AND in the query.
/// </summary>
/// <remarks>
/// Only simple properties such as strings and value types can be evaluated by this method. If you require a more
/// advanced query you should add an entity specific DbRepository class which extends this class.
/// </remarks>
/// <param name="example">The entity to use as an example</param>
public virtual IQueryable<TEntity> GetByExample(TEntity example)
@floatdrop
floatdrop / gulpfile.js
Last active May 9, 2019 15:18
gulp.watch - run mocha tests on every file changed
// npm i gulp gulp-watch gulp-mocha gulp-batch
var gulp = require('gulp');
var mocha = require('gulp-mocha');
var batch = require('gulp-batch');
gulp.watch(['test/**', 'lib/**'], batch(function (events, cb) {
return gulp.src(['test/*.js'])
.pipe(mocha({ reporter: 'list' }))
.on('error', function (err) {