Skip to content

Instantly share code, notes, and snippets.

View nicholascloud's full-sized avatar

Nicholas Cloud nicholascloud

View GitHub Profile
@nicholascloud
nicholascloud / global-npm-packages.md
Last active December 3, 2019 14:58
Global npm tools/packages that I use

Version control

  • git-run - A tool for managing multiple git repositories
  • git-open - Type git open to open the repo website (GitHub, GitLab, Bitbucket) in your browser.
  • git-recent - List recent git branches, formatted so fancy

JavaScript development

  • eslint - ESLint is a tool for identifying and reporting on patterns found in ECMAScript/JavaScript code.
@zhujunsan
zhujunsan / Using Github Deploy Key.md
Last active August 8, 2024 11:53
Using Github Deploy Key

What / Why

Deploy key is a SSH key set in your repo to grant client read-only (as well as r/w, if you want) access to your repo.

As the name says, its primary function is to be used in the deploy process in replace of username/password, where only read access is needed. Therefore keep the repo safe from the attack, in case the server side is fallen.

How to

  1. Generate a ssh key
@demisx
demisx / gulpfile.js
Last active July 14, 2022 16:06
Gulp 4 gulpfile.js
// Gulp 4
var gulp = require('gulp');
var using = require('gulp-using');
var grep = require('gulp-grep');
var changed = require('gulp-changed');
var del = require('del');
var coffee = require('gulp-coffee');
var less = require('gulp-less');
var coffeelint = require('gulp-coffeelint');
var sourcemaps = require('gulp-sourcemaps');
var koa = require('koa');
var route = require('koa-route');
var serve = require('koa-static');
var db = require('./db');
var render = require('./render');
var app = koa();
app.use(serve('public/'));
@mugli
mugli / install-java7.sh
Created January 30, 2014 21:51
Silently install Oracle Java 7 on Ubuntu (without license agreement step)
#!/bin/bash
sudo apt-get install -y python-software-properties
sudo add-apt-repository -y ppa:webupd8team/java
sudo apt-get update
# Enable silent install
echo debconf shared/accepted-oracle-license-v1-1 select true | sudo debconf-set-selections
echo debconf shared/accepted-oracle-license-v1-1 seen true | sudo debconf-set-selections
@nicholascloud
nicholascloud / blog-npm-root-packages.md
Last active December 16, 2015 03:49
blog-npm-root-packages
@roolo
roolo / .gitconfig
Created October 21, 2011 14:39
git-merge with KDiff3 on Mac OS X Lion
# This is file ~/.gitconfig
[merge]
tool = extMerge
[mergetool "extMerge"]
cmd = ~/bin/extMerge \"$BASE\" \"$LOCAL\" \"$REMOTE\" -o \"$MERGED\"
@lucasfais
lucasfais / gist:1207002
Created September 9, 2011 18:46
Sublime Text 2 - Useful Shortcuts

Sublime Text 2 – Useful Shortcuts (Mac OS X)

General

⌘T go to file
⌘⌃P go to project
⌘R go to methods
⌃G go to line
⌘KB toggle side bar
⌘⇧P command prompt
@ingramj
ingramj / getdelim.c
Created July 25, 2011 20:27
Implementations of the getdelim() and getline() functions from POSIX 2008, just in case your libc doesn't have them. They should comply with the POSIX standard, but they haven't been thoroughly tested yet.
/* Implementations of the getdelim() and getline() functions from POSIX 2008,
just in case your libc doesn't have them.
getdelim() reads from a stream until a specified delimiter is encountered.
getline() reads from a stream until a newline is encountered.
See: http://pubs.opengroup.org/onlinepubs/9699919799/functions/getdelim.html
NOTE: It is always the caller's responsibility to free the line buffer, even
when an error occurs.