Skip to content

Instantly share code, notes, and snippets.

// Restify Server CheatSheet.
// More about the API: http://mcavage.me/node-restify/#server-api
// Install restify with npm install restify
// 1.1. Creating a Server.
// http://mcavage.me/node-restify/#Creating-a-Server
var restify = require('restify');
@clockwork189
clockwork189 / nginx.conf
Created October 30, 2017 04:06 — forked from plentz/nginx.conf
Best nginx configuration for improved security(and performance). Complete blog post here http://tautt.com/best-nginx-configuration-for-security/
# to generate your dhparam.pem file, run in the terminal
openssl dhparam -out /etc/nginx/ssl/dhparam.pem 2048
@clockwork189
clockwork189 / introrx.md
Created May 3, 2017 19:57 — forked from staltz/introrx.md
The introduction to Reactive Programming you've been missing
@clockwork189
clockwork189 / UX through Web
Created August 7, 2014 23:25
Website, admin and researcher UX.
Alright this is a long note, so please take your time and read through it and let me know what you think.
New Website:
Goals for the new website:
- Describe who we are?
- What we do?
- How are we different?
- What we have to offer?
- Get user to create an account

Launch the instance and connect with ssh.

##Update the server

sudo yum update

##Install php and MySQL packages

@clockwork189
clockwork189 / gist:8402335
Last active January 3, 2016 03:29
Data the server spits back
[
{
"researcherId": "52b127eca3c1a14b54000021",
"updated": "1389560418512",
"created": "1389560418512",
"_id": "52d302c43dcd64f52bfa4f60",
"__v": 0,
"blocks": [
{
"name": "Skip Questions",
############################################################################
# Installing nodejs, npm, and all their pals on a Rackspace Ubuntu Server
############################################################################
# First get your tools together
sudo apt-get update
sudo apt-get install build-essential
sudo apt-get install vim
sudo apt-get install emacs
sudo apt-get install git
@clockwork189
clockwork189 / .vimrc
Created October 24, 2011 07:51
My personal .vimrc file
:syn on
set sta
set si
set et
set nu
set sw=4
set ts=8
set is
@clockwork189
clockwork189 / JQuery Image Transition Code
Created October 15, 2011 19:37
This is a simple code that allows easy and efficient image transitions.
<script type="text/javascript">
// Render on page load
$(document).ready(function() {
$(function(){
// img_container is the class that holds all the images. See after script tags.
$('.img_container img:gt(0)').hide();
setInterval(function(){
$('.img_container :first-child').fadeOut()
.next('img').fadeIn()
.end().appendTo('.img_container');},