Skip to content

Instantly share code, notes, and snippets.

View eogas's full-sized avatar
🥑
Millennial Angst

Evan Ogas eogas

🥑
Millennial Angst
  • SolidWorks
  • Milwaukee, WI
  • X @eOgas
View GitHub Profile
@revolunet
revolunet / extjs-capture.js
Created August 22, 2011 12:14
ExtJs debug : capture all events
// to capture ALL events use:
Ext.util.Observable.prototype.fireEvent =
Ext.util.Observable.prototype.fireEvent.createInterceptor(function() {
console.log(this.name);
console.log(arguments);
return true;
});
// to capture events for a particular component:
Ext.util.Observable.capture(
@angelochen960
angelochen960 / gist:4188293
Created December 2, 2012 11:29
AngularJS using [[]] as data binding symbols
<!doctype html>
<html ng-app="myApp">
<head>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.0.3/angular.min.js"></script>
<script type="text/javascript">
var myApp = angular.module('myApp', [], function ($interpolateProvider) {
$interpolateProvider.startSymbol('[[');
$interpolateProvider.endSymbol(']]');
});
@katemonkeys
katemonkeys / gist:e17580777b57915f5068
Last active July 16, 2024 16:00
Everything Wrong With The Withings API

Top Six Things You Need To Know About The Withings API*

*where “you” is probably a developer, or at least a strange user

I should preface this by saying that I got a Withings Smart Body Analyzer for Christmas last year and I’ve been generally happy with it. It purports to be able to take my heart rate through my bare feet and that seems not to work for my physiology, but overall I’m a fan. If if their Wikipedia page is to be believed they are having a pretty rad impact on making the Quantified Self movement more for normal people and they only have 20 full time employees. Also they try hard to use SI units, which I can get behind. Anyway, on to the rant.

I originally called this post “Everything wrong with the Withings API” and I meant it. For every useful field I can extract from their “award winning” app, I have spent an hour screaming at the inconsistencies in their implementation or inexplicable holes in their data

@mrcaron
mrcaron / TfsTeamChatNotification.js
Created November 1, 2016 16:54
TFS 2015 Team Chat Notification Tampermonkey
// ==UserScript==
// @name TFS Team Room notifications in Chrome
// @namespace http://solidworks.com
// @version 0.51
// @description Getting tired of switching back and forth between a browser and Visual Studio...just to see if you have any chat notifications? Use this script, and get your notifications directly on your desktop!
// @match http://sw-dev-tfs:8080/tfs/_rooms*
// @copyright 2016+, Michael Caron
// ==/UserScript==
// uncomment to debug
@madskristensen
madskristensen / VSIX-Checklist.md
Last active August 6, 2023 13:07
VS extension checklist

Visual Studio Extensibility Checklist

Here is a list of things to make sure to remember before publishing your Visual Studio extension.

Adhere to threading rules

Add the Microsoft.VisualStudio.SDK.Analyzers NuGet package to your VSIX project, which will help you discover and fix common violations of best practices regarding threading.

Add high-quality icon

All extensions should have an icon associated with it. Make sure the icon is a high-quality .png file with the size 90x90 pixels in 96 DPI or more. After adding the icon to your VSIX project, register it in the .vsixmanifest file as both the Icon and Preview image.

Name and description

@aeschright
aeschright / npm-strike.md
Last active September 8, 2021 16:32
A note about npm cli work status

When will npm@6.9.1 be released (and other PRs merged?)

On March 22, npm fired several members of the open source and community team for discussing workplace conditions and other labor organizing activities. As a result, core employee contributors to the npm cli were removed from the project, and others have left in solidarity or put their work on hold.

Multiple claims were filed with the NLRB on this matter. The NLRB has investigated and found sufficient evidence of validity to proceed. The National Labor Relations Act of 1935 protects US employees' right to engage in discussions of workplace concerns without threat of retaliation -- and awareness of the importance of how we treat each other is something I valued so much in collaborating with the cli team. How can we work together if we aren't free to discuss what we need?

It's disappointing for all of us to find the work we were doing interrup

public class UserApiAuthenticationService : IUserApiAuthenticationService
{
private readonly IMemoryCache _memoryCache;
private readonly HttpClient _httpClient;
public UserApiAuthenticationService(HttpClient httpClient, IMemoryCache memoryCache)
{
_httpClient = httpClient;
_memoryCache = memoryCache;
}
public class UserApiAuthenticationHandler : DelegatingHandler
{
private readonly IUserApiAuthenticationService _authenticationService;
public UserApiAuthenticationHandler(IUserApiAuthenticationService authenticationService)
{
_authenticationService = authenticationService;
}
protected async override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationTokencancellationToken)
public void ConfigureServices(IServiceCollectionservices)
{
services.AddMemoryCache();
services.AddHttpClient<IUserApiAuthenticationService, UserApiAuthenticationService>()
.ConfigureHttpClient(c => c.BaseAddress ="http://urltotheuserapi.com");
services.AddTransient<UserApiAuthenticationHandler>();
services.AddHttpClient<UserService, UserService>()
.ConfigureHttpClient(c => c.BaseAddress ="http://urltotheuserapi.com")
.AddHttpMessageHandler<UserApiAuthenticationHanler>();