Skip to content

Instantly share code, notes, and snippets.

Sergio Lepore sergiolepore

Block or report user

Report or block sergiolepore

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
View profile.json
{
"$schema": "https://aka.ms/terminal-profiles-schema",
"globals": {
"alwaysShowTabs": true,
"defaultProfile": "{79285a8e-036c-446f-8a9c-78994e34cf85}",
"initialCols": 120,
"initialRows": 30,
"requestedTheme": "dark",
"keybindings": [
{
@copperlight
copperlight / .bashrc
Created Aug 11, 2016
Window Subsystem for Linux ssh-agent Configuraton
View .bashrc
# ... more above ...
# wsfl bash is not a login shell
if [ -d "$HOME/bin" ] ; then
PATH="$HOME/bin:$PATH"
fi
# ssh-agent configuration
if [ -z "$(pgrep ssh-agent)" ]; then
rm -rf /tmp/ssh-*
View readme.md

Disclaimer: This is an unofficial post by a random person from the community. I am not an official representative of io.js. Want to ask a question? open an issue on the node-forward discussions repo

io.js - what you need to know

io-logo-substack

  • io is a fork of node v0.12 (the next stable version of node.js, currently unreleased)
  • io.js will be totally compatible with node.js
  • the people who created io.js are node core contributors who have different ideas on how to run the project
  • it is not a zero-sum game. many core contributors will help maintain both node.js and io.js
@samselikoff
samselikoff / future-proof.md
Last active Dec 11, 2019
Future-proofing your Ember 1.x code
View future-proof.md

This post is also on my blog, since Gist doesn't support @ notifications.


Components are taking center stage in Ember 2.0. Here are some things you can do today to make the transition as smooth as possible:

  • Use Ember CLI
  • In general, replace views + controllers with components
  • Only use controllers at the top-level for receiving data from the route, and use Ember.Controller instead of Ember.ArrayController or Ember.ObjectController
  • Fetch data in your route, and set it as normal properties on your top-level controller. Export an Ember.Controller, otherwise a proxy will be generated. You can use Ember.RSVP.hash to simulate setting normal props on your controller.
@tonymtz
tonymtz / gist:d75101d9bdf764c890ef
Last active Mar 24, 2020
Uninstall nodejs from OSX Yosemite
View gist:d75101d9bdf764c890ef
# first:
lsbom -f -l -s -pf /var/db/receipts/org.nodejs.pkg.bom | while read f; do sudo rm /usr/local/${f}; done
sudo rm -rf /usr/local/lib/node /usr/local/lib/node_modules /var/db/receipts/org.nodejs.*
# To recap, the best way (I've found) to completely uninstall node + npm is to do the following:
# go to /usr/local/lib and delete any node and node_modules
cd /usr/local/lib
sudo rm -rf node*
@m19
m19 / gist:31606a34f1ac89ed612d
Created May 13, 2014
Ember Data Sails Adapter
View gist:31606a34f1ac89ed612d
(function() {
/*global Ember*/
/*global DS*/
/*global io*/
/*global _*/
'use strict';
var RSVP = Ember.RSVP;
var get = Ember.get;
@branneman
branneman / better-nodejs-require-paths.md
Last active Apr 1, 2020
Better local require() paths for Node.js
View better-nodejs-require-paths.md

Better local require() paths for Node.js

Problem

When the directory structure of your Node.js application (not library!) has some depth, you end up with a lot of annoying relative paths in your require calls like:

const Article = require('../../../../app/models/article');

Those suck for maintenance and they're ugly.

Possible solutions

@substack
substack / cities
Last active Feb 16, 2017
top cities for npm modules from the 572 top module publishers with locations set on github and a matching github and npm username
View cities
[ 'San Francisco, CA, US', 1857 ]
[ 'Oakland, CA, US', 924 ]
[ 'London, ENG, GB', 511 ]
[ 'New York City, NY, US', 482 ]
[ 'Madison, WI, US', 444 ]
[ 'Hangzhou, CN', 439 ]
[ 'Sydney, AU', 435 ]
[ 'Copenhagen, DK', 305 ]
[ 'Melbourne, AU', 254 ]
[ 'Boston, MA, US', 254 ]
@danro
danro / starter.sh
Created Sep 12, 2013
nodejs forever crontab reboot script
View starter.sh
#!/bin/sh
if [ $(ps aux | grep $USER | grep node | grep -v grep | wc -l | tr -s "\n") -eq 0 ]
then
export PATH=/usr/local/bin:$PATH
export NODE_ENV=production
cd /path/to/app && forever --spinSleepTime 10000 start server.js >> forever.log 2>&1
fi
You can’t perform that action at this time.