Skip to content

Instantly share code, notes, and snippets.

🏎

Rémy Binsztock rbinsztock

🏎
Block or report user

Report or block rbinsztock

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
@rbinsztock
rbinsztock / Update NPM with NVM Windows
Created May 17, 2019
Update NPM with NVM Windows
View Update NPM with NVM Windows
I think this is more of a previous npm version bug than nvm one.
However, to update npm delete in nvm/[node version] folder (for me it is v10.15.3) following files:
C:\Users\[user name]\AppData\Roaming\nvm\[node version]\npm
C:\Users\[user name]\AppData\Roaming\nvm\[node version]\npm.cmd
C:\Users\[user name]\AppData\Roaming\nvm\[node version]\npx
C:\Users\[user name]\AppData\Roaming\nvm\[node version]\npx.cmd
Rename npm folder to npm2
View directive.js
import fooTemplate from './foo.html';
import barTemplate from './bar.html';
app.directive('dyntemplate', function() {
return {
templateUrl: function(elem, attrs) {
if (attrs.templateUrl === 'foo.html') {
return fooTemplate;
}
return barTemplate;
@rbinsztock
rbinsztock / routes.coffee
Created Aug 19, 2015 — forked from merqlove/routes.coffee
Global Resolve for Angular ngRoute
View routes.coffee
'use strict';
angular.module('app.routes').config([
'$routeProvider', function($routeProvider) {
return angular.extend({}, $routeProvider, {
orgWhen: function(path, route) {
route.resolve || (route.resolve = {});
route.resolve = _.merge(route.resolve, {
chef: 'OrganizationCheckerProvider'
});
return $routeProvider.when.call(this, path, route);
View angular-animation-tutorial.js
// In index.html we have...
<body>
<div ng-view class="{{animateStyle}}">
</div>
</body>
// Which allows us to apply page transition animations. So, for example, to slide left from page A to page B we
// write javascript
or
<body>
View articles-controller.js.coffee
app.controller "ArticlesController", ($scope, $http, $location, $state, $stateParams, Article) ->
# =========================================================================
# Initialize
# =========================================================================
$scope.articles = {}
$scope.article = {}
# =========================================================================
View heroku.log
-----> Compiled slug size: 10.7MB
-----> Launching... ! Heroku push rejected, Could not communicate with vendor, please try again later
To git@heroku.com:protected-spire-4753.git
! [remote rejected] master -> master (pre-receive hook declined)
View gist:5091062
.ui-autocomplete {
position: absolute;
top: 100%;
left: 0;
z-index: 1000;
float: left;
display: none;
min-width: 160px;
_width: 160px;
padding: 4px 0;
View _comment.html.erb
<% div_for comment do %>
<h1>Commentaire ajouté par <%= comment.user.login %></h1>
<p class="comment-body"><%= comment.comment %></p>
<p>Depuis <%= time_ago_in_words(comment.created_at) %></p>
<%= link_to 'Effacer commentaire', comment, :method => :delete, :class => "delete", :remote => true %>
<% end %>
You can’t perform that action at this time.