Skip to content

Instantly share code, notes, and snippets.

Working from home

Leblanc Meneses leblancmeneses

Working from home
View GitHub Profile
leblancmeneses / comment_feature_tests.ts
Last active Oct 16, 2020
e2e selenium interview question
View comment_feature_tests.ts
import {authenticate} from '../utils/authenticator';
import {DetailView} from '../views/detail_view';
describe('comment behavior', () => {
describe('authenticated', () => {
it('should allow user to comment', async() => {
authenticate('username', 'password');
const detailView = new DetailView();
await detailView.navigateTo();
leblancmeneses / _int.ps1
Last active Mar 26, 2020
build for improving restaurants using robusthaven.devops
View _int.ps1
task IdentifyBuildVariables {
$BuildNumber = $build_number
$RevisionNumber = $build_vcs_number
$script:AssemblyVersion = "5.0.$BuildNumber.$RevisionNumber"
$script:BuildFolder = (pwd).path
$script:ProjectDirectoryRoot = [io.path]::Combine($BuildFolder, (resolve-path ..).path)
leblancmeneses /
Created Mar 25, 2018 — forked from gdamjan/
Setup for an easy to use, simple reverse http tunnels with nginx and ssh. It's that simple there's no authentication at all. The end result, a single ssh command invocation gives you a public url for your web app hosted on your laptop.


A lot of times you are developing a web application on your own laptop or home computer and would like to demo it to the public. Most of those times you are behind a router/firewall and you don't have a public IP address. Instead of configuring routers (often not possible), this solution gives you a public URL that's reverse tunnelled via ssh to your laptop.

Because of the relaxation of the sshd setup, it's best used on a dedicated virtual machine just for this (an Amazon micro instance for example).


View gist:8af7da70d45c96420e6b69b5c40460ca
import * as admin from "firebase-admin";
credential: admin.credential.cert('./prod-account.json'),
databaseURL: ''
const sequence = async (items, action) => {
for(let i = 0; i < items.length; i++) {
await action(items[i], i);
View gist:1ddc46271191cffea1db9a46b85aaade
await new Promise(resolve => setTimeout(resolve, 100000));
leblancmeneses / bolt-rules-throttle.json
Last active Apr 4, 2017 — forked from katowulf/rules.json
throttle messages to no more than one every 5,000 milliseconds, see
View bolt-rules-throttle.json
type SharedWithInviteRequest {
createdDate: RateLimiting
// in order to write a message, I must first make an entry in users/${uid}/rate_limiting/{feature} is Number
// additionally, that message must be within 500ms of now, which means I can't
// just re-use the same one over and over, thus, we've effectively required messages
// to be 5 seconds apart
type RateLimiting extends Number {
leblancmeneses / gist:8168088
Last active Jan 1, 2016
angular.module - Creation versus Retrieval Example
View gist:8168088
// registers module with dependencies if any, empty array otherwise
angular.module('Core', ['kendo.directives'])
// gains access to module registration pointer to append more registrations into module
// needed when files are bundled
.directive('requestVerificationToken', [function () {
return {
View gist:6555489
// re-link many to many relationship
var items = new List<ServiceContactInformation>();
foreach (var serviceContact in original.AssociatedServiceContacts)
_context.Entry(serviceContact).State = EntityState.Detached;
var entity = new ServiceContactInformation() {Id = serviceContact.Id};
original.AssociatedServiceContacts = items;
View Automapper EF IQueryable
working expression.ToString();
value(System.Data.Objects.ObjectQuery`1[Host.MockDB.CaseInformation]).MergeAs(AppendOnly).Select(x => new CaseInformationViewModel() {Id = x.Id, CaseNumber = x.CaseNumber, Title = x.ShortTitle, CaseType = IIF((x.CaseTypeDropDown == null), String.Empty, x.CaseTypeDropDown.Name), CaseType_Id = x.CaseTypeDropDown_Id, Category = IIF((x.CategoryDropDown == null), String.Empty, x.CategoryDropDown.Name), Category_Id = x.CategoryDropDown_Id, FilingAttorney = IIF((x.FilingAttorneyDropDown == null), String.Empty, x.FilingAttorneyDropDown.Name), FilingAttorney_Id = x.FilingAttorneyDropDown_Id, PaymentAccount = IIF((x.PaymentAccountDropDown == null), String.Empty, x.PaymentAccountDropDown.Name), PaymentAccount_Id = x.PaymentAccountDropDown_Id, Location = IIF((x.LocationDropDown == null), String.Empty, x.LocationDropDown.Name), Location_Id = x.LocationDropDown_Id, LowerCourt = IIF((x.LowerCourtDropDown == null), String.Empty, x.LowerCourtDropDown.Name), LowerCourt_Id = x.LowerCourtDropDown_
leblancmeneses / gist:4159277
Created Nov 28, 2012
forum - distributor without profile data input queue not created
View gist:4159277
public class EndpointConfig : IConfigureThisEndpoint, IWantCustomInitialization, AsA_Server
public void Init()