Skip to content

Instantly share code, notes, and snippets.

View cnunciato's full-sized avatar

Christian Nunciato cnunciato

View GitHub Profile
@cnunciato
cnunciato / node-and-npm-in-30-seconds.sh
Created August 15, 2012 15:42 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
@cnunciato
cnunciato / node-and-npm-in-30-seconds.sh
Created August 15, 2012 15:42 — forked from isaacs/node-and-npm-in-30-seconds.sh
Use one of these techniques to install node and npm without having to sudo. Discussed in more detail at http://joyeur.com/2010/12/10/installing-node-and-npm/ Note: npm >=0.3 is *safer* when using sudo.
echo 'export PATH=$HOME/local/bin:$PATH' >> ~/.bashrc
. ~/.bashrc
mkdir ~/local
mkdir ~/node-latest-install
cd ~/node-latest-install
curl http://nodejs.org/dist/node-latest.tar.gz | tar xz --strip-components=1
./configure --prefix=~/local
make install # ok, fine, this step probably takes more than 30 seconds...
curl http://npmjs.org/install.sh | sh
@cnunciato
cnunciato / gist:3381002
Created August 17, 2012 17:52
Copies a file from a remote host over SSH
scp remote.hostname.com:/path/to/remote/file.ext ./new-file.ext
@cnunciato
cnunciato / get-bootstrap
Created October 16, 2012 16:50
Get Bootstrap
curl -O http://twitter.github.com/bootstrap/assets/bootstrap.zip
unzip bootstrap.zip
cp -R bootstrap/* .
rm -rf bootstrap*
set :application, "appname"
set :deploy_to, "/var/www"
set :scm, :git
set :repository, "git@github.com:user/app.git"
default_run_options[:pty] = true
set :user, "www-data"
set :domain, "foo.tld"
set :normalize_asset_timestamps, false
@cnunciato
cnunciato / kill-jpgs.rb
Created March 23, 2014 21:20
Finds and deletes JPG sidecar files with corresponding DNGs
require 'find'
require 'fileutils'
tested = matched = jpgs = 0
Find.find('/Volumes/Media/Lightroom/') do |path|
if path.match(/\.dng$/i)
jpg_path = path.gsub('.dng', '.jpg')
if File.exists?(jpg_path)
@cnunciato
cnunciato / mock-component.ts
Created October 5, 2016 00:49
Mock an Angular 2 Component with an Empty Template
import { Component } from '@angular/core';
/**
* Examples:
* MockComponent({ selector: 'node-list-table' });
* MockComponent({ selector: 'node-rollup', inputs: ['someprop', 'otherprop'] });
*
* See https://angular.io/docs/ts/latest/api/core/index/Component-decorator.html for a list
* of supported properties.
*/

Notifications APIs

Based on current designs, we need new APIs that support retrieving lists of notifications, filtered by the requesting user, that allow for:

  • Listing all recent (e.g., most recent 50) notifications, grouped by origin.
  • Listing all notifications within an origin, with optional paging.
  • Deleting all notifications, irrespective of origin.
  • Deleting all notifications within an origin.
  • Deleting a single notification.
@cnunciato
cnunciato / index.html
Last active October 6, 2018 16:36
Take a day off!
<h1>Take a Day Off!</h1>
<p>
Behold, a random selection of workdays for you to take off over the next year.
</p>
<p>
Now go do something fun with them!
</p>
<ol class="days"></ol>

Keybase proof

I hereby claim:

  • I am cnunciato on github.
  • I am cnunciato (https://keybase.io/cnunciato) on keybase.
  • I have a public key ASAVjjStuW42xE4lk5AtB5vNA-Xjq_jT-O4GlI_KNjmoIQo

To claim this, I am signing this object: