Skip to content

Instantly share code, notes, and snippets.

View multiplier's full-sized avatar

John Kamuchau multiplier

View GitHub Profile
@dypsilon
dypsilon / frontendDevlopmentBookmarks.md
Last active November 16, 2025 11:36
A badass list of frontend development resources I collected over time.
@VRMink
VRMink / gist:5169211
Last active January 6, 2020 20:31
How to setup a private node.js web server with SSL authorization

Secure private web server with NodeJS

This article will explain how to set up a secure web server with NodeJS which only accepts connection from users with SSL certificates that you have signed. This is an efficient way to ensure that no other people are able to access the web server, without building a login system which will be significantly weaker.

I will not explain how to create a certificate authority (CA), create certificates or sign them. If you need to read up on this, have a look at this excelent article on how to do it with OpenSSL (Mac and Linux): https://help.ubuntu.com/community/OpenSSL#Practical_OpenSSL_Usage It is also possible to do this on a Mac with the keychain application, and I assume it is possible on a Windows machine aswell.

This architecture will allow you to have one web server communicating with an array of trusted clients, the web server itself can be on the public internet, that will not decrease the level of security, but it will only ser

@randomecho
randomecho / australian-postcodes.sql
Last active November 23, 2025 08:26
Australian postcodes (with states and suburb names) geocoded with latitude and longitude.
/*
Taken and cribbed from blog.datalicious.com/free-download-all-australian-postcodes-geocod
May contain errors where latitude and longitude are off. Use at own non-validated risk.
*/
SET NAMES utf8;
SET sql_mode = 'NO_AUTO_VALUE_ON_ZERO';
DROP TABLE IF EXISTS postcodes_geo;
@23inhouse
23inhouse / gist:3594808
Created September 2, 2012 04:18
Customizing simple_form and bootstrap

Customization

<%= f.input :state, :collection => ['SA', 'WA'] %>
<%= f.input :state,
            :as => :radio_buttons,
            :collection => ['SA', 'WA'],
@robzolkos
robzolkos / deploy.rb
Created June 25, 2012 07:03
deploy.rb for Linode
#$:.unshift(File.expand_path('./lib', ENV['rvm_path'])) # Add RVM's lib directory to the load path.
require 'bundler/capistrano'
require 'rvm/capistrano'
require "capistrano_colors"
require 'thinking_sphinx/deploy/capistrano'
require 'delayed/recipes'
set :normalize_asset_timestamps, false
set :rvm_type, :user
set :rvm_ruby_string, 'ruby-1.9.3-p125@appname'
@gertig
gertig / 0_steps
Created March 31, 2012 20:26
VPS Setup and Deployment (Railscasts.com #335)
When building a new instance of Amazon EC2 choose quick-start-1 as the security group not default
#LOCALLY
$ capify .
$ chmod +x config/unicorn_init.sh
$ git add .
$ git commit -m "deployment configs"
If rebuilding an instance don't forget to remove the ssh keys
@luetkemj
luetkemj / wp-query-ref.php
Last active November 22, 2025 21:24
WP: Query $args
// This gist is now maintained on github at https://github.com/luetkemj/wp-query-ref
<?php
/**
* WordPress Query Comprehensive Reference
* Compiled by luetkemj - luetkemj.github.io
*
* CODEX: http://codex.wordpress.org/Class_Reference/WP_Query#Parameters
* Source: https://core.trac.wordpress.org/browser/tags/4.9.4/src/wp-includes/query.php
*/
@jaimeiniesta
jaimeiniesta / example.js
Created August 12, 2011 15:41
jQuery-UI autocomplete with multiple comma-separated values from a JSON remote source
$(function() {
function split( val ) {
return val.split( /,\s*/ );
}
function extractLast( term ) {
return split( term ).pop();
}
$( "#new_interest" ).autocomplete({
@napcs
napcs / README.md
Created May 6, 2011 04:10
Deploying Rails to Linode

Deploying Rails to Linode

Installing Ruby Enterprise Edition, Apache, MySQL, and Passenger for deploying Rails 3.0 applications.

Get a Linode, and set it up with Ubuntu 10.04 LTS so that you have till April 2013 to get updates. Once the Linode is formatted, boot it and continue on.

Set up an 'A' record in your DNS, pointing to the IP of your Linode. I'm using demo.napcs.com here.

Initial setup

@ryanb
ryanb / favorite_gems.md
Created March 4, 2011 17:31
A list of my favorite gems for various tasks.