Skip to content

Instantly share code, notes, and snippets.

View dbaq's full-sized avatar
🚀
Coding

Didier Baquier dbaq

🚀
Coding
View GitHub Profile
@calendee
calendee / scope-getting.js
Last active February 15, 2017 17:16
Fire Angular RootScope Event from Console, Get Get An AngularJS service
// Right click an element and select "Inspect Element"
// Courtesy : http://michalostruszka.pl/blog/2013/09/24/angularjs-in-browsers-console/ &
// http://ionicframework.com/blog/angularjs-console/
var scope = angular.element($0).scope();
var rootScope = scope.$root
scope.$apply( function() {
rootScope.$broadcast('showOffline', {msg : 'goes here', duration : 1230});
})
@coolaj86
coolaj86 / how-to-publish-to-npm.md
Last active April 2, 2024 20:18
How to publish packages to NPM

Getting Started with NPM (as a developer)

As easy as 1, 2, 3!

Updated:

  • Aug, 08, 2022 update config docs for npm 8+
  • Jul 27, 2021 add private scopes
  • Jul 22, 2021 add dist tags
  • Jun 20, 2021 update for --access=public
  • Sep 07, 2020 update docs for npm version
@fallwith
fallwith / http_headers_dump.rb
Created January 28, 2011 20:41
Rails controller code to dump raw HTTP headers from a request
logger.warn "*** BEGIN RAW REQUEST HEADERS ***"
self.request.env.each do |header|
logger.warn "HEADER KEY: #{header[0]}"
logger.warn "HEADER VAL: #{header[1]}"
end
logger.warn "*** END RAW REQUEST HEADERS ***"