Skip to content

Instantly share code, notes, and snippets.

@solsend2l
solsend2l / jq+ld.js
Last active August 29, 2015 14:23 — forked from mattosborn/gist:6eb44db53789b485ab4a
Embed jQuery and Lodash on the webpage
javascript:(function() {
var el = document.createElement('pre'),
b = document.getElementsByTagName('body')[0],
otherjQuery = false,
msg = '',
libs = [
function loadjQuery() {
if (typeof jQuery != 'undefined') {
showMsg('This page already using jQuery v' + jQuery.fn.jquery);
} else {
###############################################################################
# Helpful npm commands and code snippets
###############################################################################
# list top level packages w/o dependencies
npm list --depth=0 | sort
npm list --depth=0 | sort -g
# list top level packages that are outdated w/o dependencies
npm outdated --depth=0 | sort
@solsend2l
solsend2l / ratpack.md
Last active August 29, 2015 14:13 — forked from danveloper/ratpack.md

build.gradle

buildscript {
  repositories {
    jcenter()
    maven { url "http://oss.jfrog.org/oss-snapshot-local" }
    maven { url "http://clinker.netty.io/nexus/content/repositories/snapshots" }
  }
  dependencies {
@solsend2l
solsend2l / a.groovy
Last active August 29, 2015 14:13 — forked from danveloper/a.groovy
@GrabResolver(name='netty', root='http://clinker.netty.io/nexus/content/repositories/snapshots')
@Grab('io.ratpack:ratpack-groovy:0.9.13-SNAPSHOT')
import ratpack.handling.Handler
import ratpack.server.*
RatpackServer.of { spec -> spec
.config(ServerConfig.noBaseDir())
.handler {
{ ctx -> ctx.render "Hello World!" } as Handler
}
#!/bin/sh
#
# chkconfig: 35 99 99
# description: Node.js /home/nodejs/sample/app.js
#
. /etc/rc.d/init.d/functions
USER="nodejs"